Hacker News new | ask | show | jobs
by chipdart 605 days ago
> Or, in other words, it's the unavoidable result of insisting on using a language created for the frontend to write everything else.

I don't think this is an educated take.

The whole selling point of JavaScript in the backend has nothing to do with "frontend" things. The primary selling point is what makes Node.js take over half the world: it's async architecture.

And by the way, benchmarks such as Tech Empower Web Framework still features JavaScript frameworks that outperform Rust frameworks. How do you explain that?

3 comments

> The primary selling point is what makes Node.js take over half the world: it's async architecture.

It is the availability of the developers who know the language (JavaScript) (aka cheaper available workforce).

I disagree, it's 100% to do with the frontend and pretty much only because of that.

Node.js is popular because js is popular. You pretty much guarantee an infinite pool of developers for, like, ever. And you can even use those developers across the entire stack with greater velocity and much less onboarding.

async is cool, but not that cool. CGI was doing basically that a long time ago, and it was even more automagical.

> Tech Empower Web Framework still features JavaScript frameworks that outperform Rust frameworks. How do you explain that?

The benchmarks are constructed in such a way that highlights the strengths of the particular JS JIT implementation. JS is good at a lot of things, so if you just do those things, it might appear that it has okay performance.

People do the same thing with C# vs C++; this has been a problem forever. Sure, C# is about as fast or close if you have 16 gigs allocated to the GC and your app is using 100 megs. Now run at 95% memory usage with lots of churning and the order of magnitude differences come out. It's just a fundamental problem with GC langs.

Rust has had async for a while (though it can be painful, but I think request/response systems like APIs should not run into a lot of the major footguns).

C# has excellent async for asp.net and has for a long time. I haven't touched Java in ages so cannot comment on the JVM ecosystem's async support. So there are other excellent options for async backends that don't have the drawbacks of javascript.