DEV Community

Discussion on: I'm Javascript. And I'm done taking your shit.

 
fjones profile image
FJones

I won't rehash the arguments about the specific features (mostly because, as I said, I wasn't meaning to hate on JS too much and I'm not objecting to the features, but their uniqueness as a stand-out for particular use cases), so I'll just touch on the closing:

Practicality of JavaScript is betrayed by its legacy flaws in language design. If I'm not mistaken, the OP actually references quite a few of those. Heck, many of the points from "PHP Is A Fractal Of Bad Design" have their JS equivalent, and so the conclusion holds true as well: If I'm spending more effort on remembering the quirks, am I really using a good language?

JS is also hardly any more expressive or feature-rich than other languages. Arguably, the standard library is less feature-rich than that of most other languages, and with most of the syntax borrowed from existing languages (and shorthands becoming increasingly less verbose), that, too, betrays the strengths of JS.

That it runs everywhere is kind of my main point: Why does it run everywhere? And are those the right places for it to run? Is there any use case where it is a stand-out first choice as a language? Notably a use case where you have a choice. With language supersets like TypeScript steadily supplanting it, it isn't even the stand-out choice for web frontends anymore - and when it is used by itself, rarely without additional syntactic sugar like JSX. I can't name a use case where I'm given multiple options and would choose JS from them - even though the underlying paradigms of a prototype-based functional language should lend themselves well to that. Each use case JS is reasonably decent at has either no alternatives, or better ones. Better tools for the same job.

Thread Thread
 
jpantunes profile image
JP Antunes

JS is 25 years old iirc, it has plenty of history but why would anyone worry about the quirks instead of trying to learn it as a new language (post ES6)? Mind you that Typescript does not replace JS, it just helps some developers write type safe (at design time...) code, but it's still plain JS at runtime.

On another note, take a moment to read this sentence as if someone else wrote it: "Why does it run everywhere?.... Each use case JS is reasonably decent at has either no alternatives, or better ones. Better tools for the same job." To me this is an example of "old man yells at cloud", or are you going to argue that Netflix handling 15% of all web traffic with Node.js is a bad decision?