I would be interested to learn from somebody with experience using both Bun and Deno: which one is actually the more compelling Node successor? Bun's website makes some impressive performance claims over Deno. Are these true in practice? And if so, why? Seems like Deno also has similar goals. Also, are there large philosophical differences between the two projects? Like Bun tries to reimplement the kitchen sink but Deno wants a new post-Node way of doing things? (Just guessing, no idea if that's true.)Any seasoned users with time spent on both?
afavour|2 years ago
It seems Bun’s major selling point is performance. I can’t say I’ve really run into massive performance concerns with Node. It isn’t earth shatteringly fast but I’m way more likely to run into IO constraints than Node speed issues.
Deno’s major selling point was that it was Node Done Right in many ways: better packaging, ES6 all the way, etc. (a pitch I was sold on!) but it seems they gave up trying to create a new ecosystem and instead are adding Node compatibility.
Alongside all of this I'm encouraged by a number of recent Node improvements like having its own test runner and built in .env support. So I’m struggling to see good reason to use either Bun or Deno. Even if I were to switch I'd need to make sure I have a concrete path back to Node should the new generation tool become unviable.
madsbuch|2 years ago
This is extremely compelling for frontend DX.
Rapzid|2 years ago
Not sure how they plan on monetizing.
TheAceOfHearts|2 years ago
Bun is bundling everything and making it really fast, while also striving to maintain as much compatibility as possible with Node. It doesn't throw away the existing ecosystem.
Deno took on too much of an adversarial perspective towards the Node ecosystem and now they're working towards re-adding support.
So in terms of a successor, I'd say the only option is Bun because it's still trying to maintain compatibility with Node while innovating with new features.
hollowturtle|2 years ago
azu|2 years ago
Why Bun uses WebKit/JSC was described here:
> One of the reasons why Bun bet on JavaScriptCore instead of embracing the server-side V8 monoculture is because JavaScriptCore and WebKit/Safari are strongly tied together. This means that Bun can often use implementations of Web APIs from WebKit/Safari directly, without having to reimplement them. This is a great example of that.
via https://bun.sh/blog/bun-v0.7.1#messageport-messagechannel-ar...
ShadowBanThis01|2 years ago
For new, from-scratch projects done by someone who doesn't know Node anyway, why not use Deno? I just started writing the server side of a mobile app with it, and I didn't even know JS, TS, or have any experience with routing frameworks. I had server-side queries working in a matter of days, and I don't claim to be fast at all.
The issues cited in the Bun PR, like the morass of modules and related performance problems, don't seem to exist in plain Deno. Or am I missing something? I don't anticipate ever integrating anything from NPM, so I'm actually disappointed (but understanding of the motivation) to see Deno hedge on the "fresh start" idea.
e1g|2 years ago
ShadowBanThis01|2 years ago
I have never used Node and am creating a new project from scratch, so I don't know how worried to be about your commentary.
ketzo|2 years ago
schemescape|2 years ago
Edit: sounds like this is changing. Thanks for the correction!
jakegmaths|2 years ago
schemescape|2 years ago
re-thc|2 years ago
Bun aims to be a better replacement to Node. There's less to consider so it's just a matter of if it's compatible enough and faster / better to warrant the switch. A lot easier to swallow.
ShadowBanThis01|2 years ago
I know very little about JS and TS and "modules," but from a newcomer that's how it all looks. I'm happy to have any further insight!
evbogue|2 years ago
lioeters|2 years ago
But, the command `bun install` supports NPM and custom registries, as well as Git and .tgz URLs.
https://bun.sh/docs/cli/install#git-dependencies
wdb|2 years ago
manojlds|2 years ago
ignoramous|2 years ago
While Node's performance story keeps improving release over release [1].
[0] https://archive.is/NCzRQ
[1] https://twitter.com/lemire/status/1699459534190698999