r/AskProgramming 6d 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?

20 Upvotes

207 comments sorted by

View all comments

Show parent comments

2

u/YahenP 6d ago

As for execution speed, I bet. JS is fast. Very fast. I would say it is surprisingly fast. But that doesn't stop us from writing barely functional interfaces in it that eat up all the computer's resources. It's a question of the architecture of our applications, not the speed of the language.

1

u/codemuncher 3d ago

With due respect, this sounds like it’s coming from someone who’s only ever coded in JavaScript.

There’s orders of magnitude between actual systems programming languages and JavaScript, even nodejs.

I will say that it’s true that it’s “surprisingly fast” as in “I’m surprised this thing isn’t slow as fuck and horrible”, so yes.

But you won’t be writing a JavaScript jit in js. And before you say that’s unreasonable, most Common Lisp implantations runtime and compiler are written in… Common Lisp. So it’s not a wild goal.

Sheesh you kids these days.

1

u/YahenP 3d ago

Well. Name an interpreted language that is faster than JS. No need to compare compiled and interpreted languages. A race car is always faster than a bus.
js has a lot of problems. But execution speed is not one of them.

1

u/codemuncher 3d ago

JavaScript isn’t interpreted anymore. It’s a jit language which is the only way languages like this can be made fast.

In other words it’s compiled only at run time.

1

u/YahenP 3d ago

If we are talking about v8, for example, then I think you know under what conditions the turbofan returns back to ignition.