7 ms·
So there is lexical scope, but it requires "do" which means an extra function, something that wasn't required in JS. You don't get lexical scope "for free" in C
by benth 14y ago
So there is lexical scope, but it requires "do" which means an extra function, something that wasn't required in JS. You don't get lexical scope "for free" in CoffeeScript, there's overhead, unlike in JS. Is that right?
- raganwald 14y agoYes, and that is a concern I share: https://github.com/jashkenas/coffee-script/issues/2552 https://github.com/jashkenas/coffee-script/issues/2552 Scheme interpreters have been optimizing away the cost for most cases since the 1970s.
- mchahn 14y agoI use `var x;` which transpiles exactly to var x; so there is no overhead. The backtick in CS lets JS pass through.