Hacker News new | ask | show | jobs
by z3t4 2807 days ago
Embarrassingly enough I had programmed for many years before understanding those concepts. I only knew them instinctively. Coming from a multi-threaded web framework background, writing heavily async code was painful. But it became so simple after learning about closures and lexical scope, and that's why I consider them to be JavaScript's main features, even though almost all other languages have them too. The main reason why I haven't moved on to another language is that I get PTSD (from maintaining multi threaded code with global variables) - when I see a variable or function that I don't know where it comes from, which is common in languages that does not support lexical scoped named imports.