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
23
u/mernen Jul 26 '13
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.