3 ms·
I'd argue that that's a feature. You're asking for decreased code comprehension and bugs when you start using identical variable names everywhere. I have notic
by rmrfrmrf 13y ago
I'd argue that that's a feature. You're asking for decreased code comprehension and bugs when you start using identical variable names everywhere.
I have noticed a lot of "Issues" in the CoffeeScript repo from angry hackers that were mad that CoffeeScript forces them to code with some modicum of responsibility (no drop-throughs in switch statements, no var shadowing, etc.). Doesn't make sense to me why people would blast JavaScript for letting you do stupid shit then get butthurt when a solution takes those same problems away.
- spion 13y agoNo, I'm not asking for bugs. I'm asking for a basic feature of natural languages: to define a context where I work, where short, concise words have a precise meaning. This is an elementary thing - its the basis behind namespaces, the drive behind object oriented programming. Its a fundamental design mistake to put limits on this. But its worse, because its also a silent mistake. Shadowing could be forbidden but variable declaration and assignment could still be different things, and then the compiler could warn you when you try to re-use a name. But no, coffee script will give you random bugs instead. JavaScript has its rough edges. CofeeScript simply has a rot right in its core.