3 ms·
> the scoping is wacky (and the var trap is a disaster); Read http://bonsaiden.github.io/JavaScript-Garden/#function.scopes http://bonsaiden.github.io/JavaScri
by peter_l_downs 13y ago
> the scoping is wacky (and the var trap is a disaster);
Read http://bonsaiden.github.io/JavaScript-Garden/#function.scopes http://bonsaiden.github.io/JavaScript-Garden/#function.scope..., be enlightened
- quackerhacker 13y agoNice! Just bookmarked that. I love javascript! The main thing: offloading the computing directly to the end user. The best cocktail...mix some JS with some CSS3, maybe throw a little HTML5 in there....yup, the only thing I find bad about JS is bad memory management, but that (like most times), comes down to code structuring.
- ajanuary 13y agoIt bugs me an unreasonable amount when articles that have the space to explain it properly talk about hoisting as if it's an actual step compilers do rather than just a handy metaphore. They've literally _just_ talked about scope chains. It makes it seem like a crazy ill-conceived feature rather than the result of some tricky trade-offs.
- PommeDeTerre 13y agoKnowing what's going on doesn't change that it's all still unnecessarily very broken.