News for hackers. Stuff that matters.
Re:JavaScript Isn't Scheme (2013) by TheCoelacanth on Thursday April 26, 2018 @10:59AM (#16932449)
I don't like the function level scoping, but I could probably get over it.

Hoisting variable definitions is just straight up pants on head stupid.

The way scoping for `this` works is bizarre and un-intuitive. I routinely run into people who spend a lot of time programming in JS and who I consider pretty smart and capable programmers (based on reviewing dozens/hundreds of PRs from them) who didn't understand the way it works until after I explained it to them.

let/const/arrow functions fix most of these, but it took over twenty years for those problems to get fixed. Also, they didn't exist when this article was written in 2013.

There are no comments on this comment yet.