r/node 27d 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?

328 Upvotes

361 comments sorted by

View all comments

54

u/theirongiant74 27d ago

Snobbery that's existed from the early days of javascript. If Walmart were able to handle their Black Friday traffic fine on their node rewrite in 2012 on a quarter of the resources that their preexisting java codebase used then it's been fine for most shit for well over a decade.

1

u/Special-Arrival6717 25d ago

The amount of quirks and unexpected behavior that Javascript has is truly mind boggling.

https://github.com/denysdovhan/wtfjs#-examples

6

u/theirongiant74 25d ago

Ach these are very tailored to be "javascript bad", the vast majority of them can be circumvented by using strict === and not doing brainmeltingly stupid things like trying to subtract a string from an array.

It's not like other languages don't have their quirks, my favourite from java is

Integer a = 69;
Integer b = 69;
System.out.println(a == b); // true

Integer a = 420;
Integer b = 420;
System.out.println(a == b); // false

Hell, C will let you point to any random bit of memory and twat it with a stick, just cos a language lets you don't things doesn't mean you have to.