4 ms·
I am not going to defend JS here. But I will say, take your favorite language (which I assume is either Python, Ruby or Java) and imagine it is running in a br
by inputcoffee 10y ago
I am not going to defend JS here.
But I will say, take your favorite language (which I assume is either Python, Ruby or Java) and imagine it is running in a browser.
It sends a message to the server, and then it has to continue and then interrupt what it is doing when the server responds. How would you handle it?
I think you will, very quickly, reproduce the "bad" features of Javascript.
- taco_emoji 10y agoPromises and/or async/await from day 0 would've helped a lot of people not code themselves into "callback hell". But I really think the features that people consider bad have much more to do with the syntax: Lack of block scoping, lack of const, parseInt("072") === 58, eval, existence of the new() operator [0], semicolon insertion, function hoisting, == vs. ===, with statement. [0] causes inexperienced devs to think JS is object-oriented when it is not