3 ms·
CoffeeScript's Scoping is Madness
- sixbrx 13y agoI do tend to agree with the blog author that shadowing is far preferable to what CS does. I believe the fork that led to Livescript grew partly out of this concern.
- likeclockwork 13y agoI don't miss shadowing in CoffeeScript at all. I agree with the idea that the larger the scope of a variable the more descriptive its name should be and the small its scope the shorter its name can be. I also don't think it's good to get carried away with closure depth, stacking them n levels deep.
- deleted 13y ago[deleted]
- nickporter 13y agoI guess in theory you could do something like this: y = 0 test = (x) -> `var y = 10` x + y The language is open source... we could fix it!