logoalt Hacker News

thot_experimentyesterday at 10:20 PM5 repliesview on HN

Why people use Deno and Bun over Node? I think it's neat that there are competitors for JS runtimes, but I really don't understand what advantages I'd get by swapping to one of these over Node. Bun has no REPL and worse JS engine, Deno is just Node with a restrictive, annoying permission system and no sqlite. Both claim better performance, but that only seems true in cherrypicked benchmarks, and in my tests (granted about a year ago at this point) both alternatives under-performed Node in my workloads. What am I missing?

EDIT: Actually I just remembered I delivered a small ERP tool to a business a while back and I did opt to use I think Bun for that because it had the most robust tools to wrap a project into an `*.exe`, that was definitely a better experience than Node. Though since that was dependency-less JS I did the whole thing using Node and then just shipped it with Bun.


Replies

notnullorvoidyesterday at 11:31 PM

I switched to Deno because it is the only option out of the 3 that allow monorepo workflow without building .d.ts files. Bun and Node both do type stripping or compiling of TS, but it only works for the entry package of the running script, not any of the linked dependencies from the same repo.

There are still things I dislike about Deno, but it really does make package development a lot simpler. JSR is a great upgrade from NPM, and Deno makes it so simple to publish to both NPM and JSR. Strict IO permission system and WebGPU support are also nice to have.

> wrap a project into an `*.exe`

Deno makes this simple too. Though that's where it's bundling features stop. Honestly I am okay with that, I'd rather use Rolldown or Vite for web or library bundling.

show 1 reply
flotheryesterday at 11:28 PM

> Bun has no REPL

Bun has a really nice REPL, can recommend https://bun.com/docs/runtime/repl

show 1 reply
kevinmgrangeryesterday at 10:25 PM

Deno has sqlite: https://docs.deno.com/examples/sqlite/

show 2 replies
crubieryesterday at 10:39 PM

The Bun DX is infinitely better than Node's, especially for Typescript projects

show 1 reply
lugouesyesterday at 10:30 PM

I like Deno because there is no "install" step for users, you just run it.