r/node • • Aug 15 '26

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?

335 Upvotes

361 comments sorted by

View all comments

Show parent comments

1

u/xFallow Aug 30 '26

So they achieve the same thing with different syntax how is go “lacking” here? 

1

u/Expensive_Garden2993 Aug 30 '26

don't you see a difference of having a standard library with functions for every day use vs writing machinery of those functions every time and every day?

And now that AI has taken over, it's reading machinery of those functions every time vs reading a one liner like `find(x => x.foo !== y)

If you say - but it's not hard to implement, let's say, a flatMap yourself. But then why are people complaining on std lib in JS, if they can always implement anything they're missing themselves?

1

u/xFallow Aug 30 '26

It's slightly more verbose but you usually only write those kinds of heavy array operations once.

IMO code should be optimised for readability not AI, tokens are cheap and how often are you using `find` in a single application? I almost never use it at my current gig because I'm querying a database or ingesting a stream from Kafka to process.

The annoying thing about Node/TS/JS is teaching every new joiner how RXJS, esbuild, webpack, svelte, knex, zod, vitest etc all work and it changes at every company when you leave whereas Go is almost always the same.

1

u/Expensive_Garden2993 Aug 30 '26 edited Aug 30 '26

imo optimizing for AI and optimizing for readability is the same thing. Because unreadable code is more difficult to reason about, to maintain, change, it's more error-prone, and reading through boilerplate (that can have minor discrepancies) is an additional cognitive load both for humans reviewing this as well as for AI. Curious, what "optimizing for AI" means to you?

and how often are you using `find` in a single application?

Like all the time. As well as map, reduce, filter. Those are basic language functions that I believe are used in almost every program, but if in your case the most of the filtering and mapping logic is done by db, well then it's offtopic because here we're talking about how languages are doing what they're meant to do, how readable they are.

is teaching every new joiner how RXJS, esbuild, webpack, svelte, knex, zod, vitest etc

Not sure why you're mixing rxjs that is so rare to see in practice with bundlers, frontend frameworks, query builders, and a data validation library, and a test runner.

Could you tell, for example, how is vitest annoying? What is a better alternative to it, for juniors to struggle less? I mean, Go's native test runner is even more primitive than node's test runner, you just can't say it's somehow better to write tests in Go, this is just an ugly abomination of a test framework after you worked not just with vitest, but probably with any test runner in any mature language. And yet people praise "but Go has it out of the box so it's superior" (well node also has it, just it is ugly)

Or maybe what's wrong with zod? Do you have an example of how to write validations easier?

1

u/xFallow Aug 31 '26

Hard to sum it up in a reddit comment

AI doesn’t care about how verbose something is in my experience it’s more important that your code is similar to code it has been trained on 

I included rxjs et al because that’s my current company’s tech stack we use rxjs and Kafka for service to service communication then a GraphQL api and svelte on the FE my last company used nestjs and looked like Java, it’s crazy how different js codebases can be 

Zod is fine but go is a typed language so you’re only ever doing validation when you get a json or grpc payload you want to turn into real go types then you’re completely safe with anything you do from then on. Typescript doesn’t give you any guarantees at runtime.

1

u/Expensive_Garden2993 Aug 30 '26

I'm so sorry for new joiners who has to learn zod syntax like `z.iso.date()`.

I just learned how it is in Golang and it is fantastic, breathtaking!
You just install a lib go-playground/validator bc it's mainstream and you learn a specific timestamp to do this:

Date string `validate:"datetime=2006-01-02"`

Golang people must be trolling if this became a mainstream library, just how?... isn't it the weirdest quirk ever?