News for hackers. Stuff that matters.
Re:Actually, you don't understand lexical scope by raganwald on Monday September 17, 2012 @05:33PM (#4535010)
I'm in the camp of favouring explicit variable declaration

So am I, which is why the post explains exactly how to do it in CoffeeScript. I am glad he dropped "var," but I happen to disagree with his design choice for what to do with variables that are not explicitly declared.

But agree or disagree, it is not correct to say that there is no lexical scope in CoffeeScript when in reality people are debating how they want a leaky abstraction automatic variable hoisting feature to work.

Re:Actually, you don't understand lexical scope by benth on Monday September 17, 2012 @07:49PM (#4535499)
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?
Re:Actually, you don't understand lexical scope by raganwald on Monday September 17, 2012 @08:55PM (#4535711)
Yes, and that is a concern I share:

https://github.com/jashkenas/coffee-script/issues/2552

Scheme interpreters have been optimizing away the cost for most cases since the 1970s.

Re:Actually, you don't understand lexical scope by mchahn on Saturday September 22, 2012 @12:25AM (#4557117)
I use `var x;` which transpiles exactly to var x; so there is no overhead. The backtick in CS lets JS pass through.