Join the discussion

Write your take first — we'll ask for email only when you're ready to publish.

  • Hacker News
  • Because it was a really bad idea to start using JavaScript outside the browser anyway.

    We were doing just fine before node, and this whole rewrite JavaScript into something compiled, and more usable, is the closing of a circle that should never have happened in first place.

  • You can wait for slow programs that use a ton of excess memory, sure.

    Or, you can have fast programs that use memory efficiently.

    You just can’t do it in JavaScript. You can get really performant with JavaScript with careful engineering for sure… but there’s a big wall of diminishing returns even with all of the JIT compilation and tracing garbage collection.

    Nothing stopping those same JS developers from learning some Zig or Rust or whatever. It might actually be easier to learn than memorizing all of JavaScript’s implicit coercion rules.

    But if that’s too much to ask then stay in JS land and make sure there are JS devs to write tools for!

  • I love JavaScript and TypeScript, but like all interpreted languages, they really do have a hard time fitting into certain environments where you can't get an enormously complicated VM or can't get by with a much slower version of the language.

    You can argue that high-throughput / low-latency dev tools are one of these environments. I'm not so sure. I think a lot of JS tooling is written in slow JS and gets fast with a rewrite to another language largely because of better structure.

    Some environments really are tougher though. I started using WebAssembly a lot a year ago and the story for JavaScript and Python is just pretty terrible. And for JS, the things that make it hard to run in Wasm aren't universally good things to have in the language in the first place. The extreme dynamism of JS is something that so much JS tooling tries to limit.

    But I think a lot of the language is quite good, and that there are possible variants of JS that are great even. I started one I hope will fit that one day (https://zena-lang.dev) and the first use cases for me are all tooling to try to make sure it's at least good for that: self-hosted compiler, formatter, regex engine, JSON parser, etc. It's quite a bit like JS/TS, but fixes a lot of things and runs forward with features that will take JS many years to get to, if it ever does (ie, pipelines, pattern matching).

    I'm hoping that WebAssembly can slowly continue to gain a place on the web so JS can give up its near monopoly there. We'll see!

  • > Rust, Go and Zig are taking over increasingly large parts of the JavaScript toolchain...

    Large parts of the JavaScript application space too.

    Language consistency, ergonomics, standard library and performance matters, and JS has major warts here. I bet when these languages are 30+ years old like JS is, the software landscape isn't dominated nearly as much by JS.

    These days I intentionally start all projects with as little JS as possible, opting for Go and HTMX instead. Removing the layers of JS inconsistency and build tools makes my and my agents lives better.

    More thoughts on my JS-less stack here: https://housecat.com/blog/the-hugs-stack-hypermedia-unix-go-...

  • JavaScript is an abomination that never should've been left alive.

    And yes, I ask myself the question: "Who in his right mind would run JavaScript on the server and even write business logic in it?" Lots of idiots in this world it seems. JavaScript is the reason our text editors need 16GB of RAM to run these days and a simple weather app 1GB.

    In the ol' days assembly programmers probably could've written the weather app in a couple of KB (that's a MILLION times less memory people).

  • Heterodox argument: a big part of the reason JavaScript has been so successful is that interpreted languages actually can be extremely fast—competitive with, and in many cases, faster than compiled languages, with V8 arguably the fastest interpreter in existence.

    See this post by Mike Pall, author of LuaJIT (which is comparable to or faster than V8 performance-wise, despite being basically a single-developer project), which explains why: https://web.archive.org/web/20180603053407/http://article.gm.... Basically, it’s much easier to add high-quality runtime-trace-aware recompilation to a JIT interpreter, which a non-trace-aware compiled language will often not be able to beat.

  • > I start wondering what we're supposed to do with all those precious milliseconds it just handed us back

    Speed matters. WebAssembly is taking jobs from JavaScript precisely because it's faster.

    The calculation engine for Google Sheets became twice as fast with the switch to WebAssembly: https://web.dev/case-studies/google-sheets-wasmgc

    The Amazon Prime Video app became twice as fast with less variability in performance when they switched to WebAssembly: https://www.amazon.science/blog/how-prime-video-updates-its-...

    Compiling to WebAssembly enables every language to run in the browser. Google used Java and Amazon used Rust.

    by cisc
  • > Rewrite a bundler in Rust and you haven't only made it faster. You've also shrunk the pool of JavaScript developers who can maintain it. The new tool still looks like a duck and quacks like a duck, but it's a different beast altogether. Its internals retreat behind a black box that fewer people hold the keys to. The source may still be open, but the door to contributions is closing.

    Alternatively, there's a pool of JS developers who shouldn't be maintaining critical infrastructure to begin with.

    It's not a black box, those codebases are usually open and the only thing holding you or anyone back is learning anything outside of a small pond of JavaScript.

    Write non-browser-things in fast languages. It is not a complicated concept - even less so in an era where stuff is getting written for you.

Explore Birbla archives

The JavaScript Midlife Crisis · Birbla