Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

avoid creating unused results arrays #1

Closed
wants to merge 1 commit into from

Conversation

timruffles
Copy link

iterators in Coffeescript will create result arrays (check JS source to see them) if they're the last expression in a function. added return nulls here to avoid them

iterators in Coffeescript will create result arrays (check JS source to see them) if they're the last expression in a function. added return nulls here to avoid them
@chenglou
Copy link
Owner

What a coincidence, I was just thinking about that! Thanks a lot.
I have the habit of keeping things constant and use undefined instead for everything that has the null concept. How about just return?

@timruffles
Copy link
Author

good point, even clearer!

@chenglou
Copy link
Owner

I just updated everywhere that unnecessarily returns an accumulated array, commented on them, repacked and updated the wiki. You can get the new version now and I'll close this pull. Thanks for the suggestion!

@chenglou chenglou closed this May 18, 2013
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants