With the extremely important caveat that in Ruby standard variables can never cross method boundaries. You need a constant, a global or a class variable for that, which are all syntactically different and live in their own namespaces.
The CoffeeScript developers seem to have modeled all functions in JavaScript after blocks in Ruby. There was no need for additional syntactic distinctions.
View all comments
Show parent comment
-8
u/tiglionabbit Jul 26 '13
No. It's exactly like Ruby.
That is, it forbids shadowing except for function arguments.