2 ms·
There's no evidence presented here that there's any significant (or even negative) performance impact from the way the CoffeeScript compiles these list comprehe
by rzimmerman 13y ago
There's no evidence presented here that there's any significant (or even negative) performance impact from the way the CoffeeScript compiles these list comprehensions. Also, if your performance is constrained by a list comprehension, there's nothing in CoffeeScript preventing you from using "Array.filter" instead. By and large CoffeeScript compiles one-to-one with JavaScript and when it doesn't, the resulting code is at least reasonably performant.
I do agree that the default return behavior is probably a bad idea. It probably came from Ruby, and I can see the appeal, but I've often created bugs by accidentally using the implicit return, then adding something to the end of a function. It's not really that big of a deal - I just as a policy always use an explicit return.