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

Not the first to complain about this behaviour. In fact, if you run in strict mode now, ES5 requires you to use bind, call or apply - it won't box this to the global object but will return undefined.

Why do you think they decided to do this? Strict mode is to allow folks to transition their code to the new standard - and the new standard has made this decision to fix a flaw in JavaScript - it acknowledges its a hack to return the global object in this case.

So I'm less editorialising and more pointing out what is already known. Hope this helps.



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

Search: