3 ms·
> JavaScript also has much better scoping Though I generally agree, that's as long as you mandate linting. JS's implicit globals are even worse than Python's i
by masklinn 14y ago
> JavaScript also has much better scoping
Though I generally agree, that's as long as you mandate linting. JS's implicit globals are even worse than Python's implicit scoping.
- tikhonj 14y agoThat's fair. My editor marks those for me automatically, so they're much less of an issue for me, but they are still really stupid. On the other hand, you can work around that particularly stupidity just by being careful. Working around the Python limitations requires either something hacky like using a one-element list instead of a variable or (only in 3, I think) a rather ugly "nonlocal" statement at the top of your scope.