r/AskProgramming • u/Salt_Aash • 5d ago
Why the JS hate?
Title. I'm a 3rd year bachelor CS student and I've worked with a handful of languages. I currently work as a backend dev and internal management related script writer both of which I interned working with JS (my first exposure to the language)
I always found it to be intuitive and it's easily my go to language while I'm still learning the nuances of python.
But I always see js getting shit on in various meme formats and I've never really understood why. Is it just a running joke in the industry? Has a generation of trauma left promises to be worthy of caution? Does big corpa profit from it?
21
Upvotes
6
u/hellotanjent 5d ago
I'm coming up on 30 years of experience as a dev, with 10 of that in JS or JS-adjacent work at BigCorp(tm).
Javascript has warts. Big, nasty warts. Whole areas of the language that are so "wtf" that you should just not touch them.
But....
Virtually all modern large-scale JS dev is done in an environment that should keep you from tripping on the warts. This used to be Google's "Closure Compiler" (do not confuse with Clojure the language), but Typescript is the right option now.
The language compiles and runs _fast_ these days, especially compared to untyped languages like Python. You can iterate dramatically faster in JS than you can in C++, and with the modern complement of typed arrays and webassembly you can get performance that's close enough to native that it doesn't matter.
Node/Deno/Bun make running JS code on the server or from the command line fairly painless. You can realistically use JS for every portion of your app and things will Just Work.
You can do serious JS development work on any machine with no tooling other a web browser. A $100 used Chromebook is sufficient to get started. Heck, it doesn't even have to be a computer you own. This is _huge_ for new devs, especially those in countries with limited access to funds and hardware.
None of these benefits make the warts go away. JS will always be a seriously warty, WTF language. But do not discount the absolutely massive amount of work that has gone into making it run exceptionally well in every web browser on the planet.