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

Lexical block scope is broken in (at least) three ways in JS: the global object and with() break lexical scoping, and hoisting breaks block scoping.

Strict mode in ES 5 does address the first two, and "let" in ES 6 addresses the latter, so that's good. But at that point, you're talking about the future and not JavaScript as it is today.



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

Search: