r/programming • u/zumpiez • Dec 22 '11
The Problem with Implicit Scoping in CoffeeScript
http://lucumr.pocoo.org/2011/12/22/implicit-scoping-in-coffeescript/
83
Upvotes
r/programming • u/zumpiez • Dec 22 '11
View all comments
Show parent comment
16
u/hylje Dec 22 '11
The downside is pretty bad.
As you can define high scope names that change behavior of functions you use, functions affected cannot be abstracted as black boxes of predictable functionality. You need to know what names they use for internal stuff, lest you accidentally collide with it.
If you mitigate this by rigorously scoping stuff out from higher levels into parallel, well, that's the same functionality as
varandnonlocal, just in a structural implementation. Certainly not obvious for a beginner nor easy to graft in to a project afterwards.