3 ms·
I use both javascript and coffeescript extensively and regularly, and I just don't understand how this ever causes real problems to anyone - unless you're writi
by spellboots 13y ago
I use both javascript and coffeescript extensively and regularly, and I just don't understand how this ever causes real problems to anyone - unless you're writing 5000 line long spaghetti code coffeescript files with ambiguous variable names, in which case lexical scoping is the least of your worries.
- lowboy 13y agoSame here.
- zackbloom 13y agoI have to agree, I will probably write 10k lines of coffeescript in the next year, much of it in reusable and open source libraries, and OPs problem does not seem to cause issues all the much in practice. People have to distinguish between the simple issues that trip up beginners, and the fundamental issues that plague you for life.
- coldtea 13y ago>I have to agree, I will probably write 10k lines of coffeescript in the next year, much of it in reusable and open source libraries, and OPs problem does not seem to cause issues all the much in practice. Whether it causes any issues in practice for some particular programmer or not (and 10K lines is not much even for ONE modern webapp, and you write them broken down in multiple libraries), the thing is the behavior is logically flawed in itself. Like Javascript needing "var" to NOT make a global variable (instead of defaulting on local vars) is. Coffescript's behavior on this scoping issue is in the list of bad items that includes goto, global variables and nullity.
- exDM69 13y ago> I use both javascript and coffeescript extensively and regularly, and I just don't understand how this ever causes real problems to anyone If you have a team that is big enough and a project that lives long enough that someone has to do changes in some old code, this thing is bound to happen sooner or later.
- deleted 13y ago[deleted]