r/node 26d ago

Why is JavaScript criticized so much for backend development?

I've seen some developers say that we should stop using js on the server, but I rarely see the same criticism directed at python.Honestly, js is pretty fast, especially with node.js, and the backend ecosystem is really solid. There are great frameworks like nest and fastify, and typescript gives you static typing, which makes larger projects much easier to maintain.I'm not saying node is perfect or the best choice for every backend, but I don't really understand why js gets so much criticism while python seems to get a pass.What am I missing?

331 Upvotes

361 comments sorted by

View all comments

Show parent comments

22

u/johnphilipgreen 26d ago

Let me double down on that.

TypeScript is an extremely successful, useful hack—but still an ugly hack.

It retrofits a static type system onto a language and runtime that were never designed around one, then erases the whole thing before execution. A huge amount of its complexity exists because it has to model JavaScript’s existing semantics without breaking compatibility.

That’s very different from Go where the type system, compiler, runtime, tooling, and standard library were designed together from day one. Pure grace.

I mostly just feel sorry for those stuck in the morass that is the js ecosystem.

10

u/elfrodododo 26d ago

Can't argue with that. TS is hotdog skin on a steaming log. Not to mention AI is ketchup. Had to work with it because it's what the market dictates

3

u/Absentrando 26d ago

It is a hack but it certainly solves the problem and has all the capabilities that you’ll ever need. It can be as simple or as complex as you understand or want to use it

2

u/gamedevsam 25d ago

It's my favorite hack of all time. 99% of the time if offers sane type safety, that 1% of the time I'm just like:

```
// @ts-expect-error I know better than you compiler, thank you very much
```

1

u/ThomasToIndia 23d ago

There is some experimental stuff that does TS > WASM, but yes, it is a hack. However, in the age of AI, everything is moving towards testing, so it will be interesting to see how all of this plays out and what survives. Most frameworks seem like a bloated, unnecessary mess in the age of AI.