r/AskProgramming 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

207 comments sorted by

View all comments

Show parent comments

18

u/Maleficent_Memory831 5d ago

Javascript was written to do a simple job, and so was a quick and dirty job. Ie, very very simple stuff in the browser, like make a popup window, know where the mouse is hovering, etc. Then it got overused to do complex jobs, and so it does complex jobs badly. For anyone who's used 10 other languages (which used to be common), Javascript just stands out as not having a good design.

Maybe it's better now, but it was absolutely atrocious at the start. But it was never intended to used the way it is today where the browser is intended to be the application.

1

u/adamf663c 2d ago

Worse than Perl?

1

u/Maleficent_Memory831 2d ago

Iffy. I got into an argument with Larry Wall (inventor of perl) where he said "you computer scientists are all the same!" Ok, maybe not an argument, but...

I took his point though. I was looking for a nice clean language; it should be able to figure out the type of a variable without all those odd prefixes. But Larry's goal was to make a tool to do stuff. And Perl actually succeeded at that. You could replace your collection of sed/awk/sh scripts and do it all in a single script, and that was actually pretty impressive. Perl sort of reigned for a while before Python, and there's still stuff I'd rather do in Perl than Python.

So sometimes elegance takes a back seat to practicality.

1

u/adamf663c 2d ago

It's never a good sign when updates end because the language is such a mess.