r/programming • • Jul 25 '13

CoffeeScript's Scoping is Madness

http://donatstudios.com/CoffeeScript-Madness
207 Upvotes

315 comments sorted by

View all comments

Show parent comment

3

u/cashto Jul 25 '13

CS is not an optimizing compiler, but that's not to say it must do stupid things that are plainly stupid.

There's no getting around knowing what CS is going to optimize and what it won't. For example, this runs out of memory:

x = [1..9e9]
console.log i for i in x

But this won't:

console.log i for i in [1..9e9]