Re:Tessel: The end of web development as we know it
by icambron on Sunday October 06, 2013 @03:26PM
(#6505126)
> I would personally be happy to sacrifice that feature and add an explicit "global" keyword but not everybody agrees, and it would break a lot of code.
For sure. That ship has probably sailed. And, like you said, linters alleviate a lot of that pain. But that's a separate question from, "is this a good language feature?"
- local by default weakens what you can do with the scope;
- we want something by default because the language is used for things like configuration files.
The 2nd point means this must be valid:
I would personally be happy to sacrifice that feature and add an explicit "global" keyword but not everybody agrees, and it would break a lot of code.What we do instead is use two kinds of tools: static global detectors and strictures (like in Perl). Similar tools are integrated in IDEs as well.
With these tools, I have never had an issue with scoping in code I have written. But it takes a little time to get used to it.