5 ms·
Agreed, it's a terrible language. Among other things, it makes it way too easy to write code which many people will read as being correct, but will actually be
by kofman 14y ago
Agreed, it's a terrible language. Among other things, it makes it way too easy to write code which many people will read as being correct, but will actually be subtly incorrect.
A few of the weakest parts:
- for (var x in y) when used for array iteration or even dict iteration; hasOwnProperty? Really?
- x[obj] = y; seriously, did i really want '[Object object]' as my key?
- the choice of function level scope over block level scope
- Xcelerate 14y agoI'm not sure function level scope over block level is a bad thing. It makes it more Lisp-y. And if you want block level scope, it's about as easy as (in CoffeeScript): do -> ... local variables right here ...
- munificent 14y ago> I'm not sure function level scope over block level is a bad thing. It makes it more Lisp-y. Lisp has block scope.
- kofman 14y agoIt might be nice to make a canonical list of things which suck about JavaScript. https://hackpad.com/spTEgxqvFYj#Things-That-Suck-About-JavaScript https://hackpad.com/spTEgxqvFYj#Things-That-Suck-About-JavaS...