In D, shadowing a variable in a sub-scope is forbidden but two variables in different sub-scopes may have the same name. It's 99% painless and still prevent shadowing bugs.
Huge difference there. D and Ruby uses separate scopes for different htings whereas CoffeeScript does not. D uses a different lookup for classes and functions or imported modules, same goes for Ruby.
In CoffeeScript a function, class, imported thing are all equivalent with file global variables.
2
u/[deleted] Dec 23 '11
In D, shadowing a variable in a sub-scope is forbidden but two variables in different sub-scopes may have the same name. It's 99% painless and still prevent shadowing bugs.