Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> 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.



That'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.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: