4 ms·
Has anyone played with both Deno and Bun? They seem very similar but while Deno uses V8 (like Node), Bun uses Apple's JavaScriptCore. https://bun.sh/ https://b
by dave1010uk 3y ago
Has anyone played with both Deno and Bun? They seem very similar but while Deno uses V8 (like Node), Bun uses Apple's JavaScriptCore.
https://bun.sh/ https://bun.sh/
https://deno.com/ https://deno.com/
- JimDabell 3y agoI built a CLI tool that needed to be compiled to a standalone executable a couple of months ago and tried out Node, Bun, and Deno for it. I dismissed Node because it was a super-manual process and experimental. Bun had some crazy bugs around handling environment variables where they were sort-of baked in at build time instead of evaluated at runtime but only used in some circumstances. I never got to the bottom of it but it was weird enough to put me off Bun because there was clearly something very wrong there and the documentation wasn’t helpful. Deno worked great. There was one bug I experienced caused by inheriting a node_modules directory that caused it to crash while building, but the fix was released a few days after it was reported. It’s definitely not as mature as Node, but it’s good enough that I would try it by default for new projects now.
- satvikpendem 3y agoThat's what I've found too. Bun has bugs and definitely shouldn't have had a 1.0 release and been called "stable." Bun also has some benchmarks where they weren't exactly correct [0]. Deno on the other hand just works. I wonder if it comes from the respective languages that each use, ie Rust favors correctness while Zig doesn't necessarily. [0] https://twitter.com/deno_land/status/1562771000802279425 https://twitter.com/deno_land/status/1562771000802279425
- kristoff_it 3y ago> Rust favors correctness while Zig doesn't necessarily I wouldn't pin this on the language, see TigerBeetle as a counter example. https://github.com/tigerbeetle https://github.com/tigerbeetle
- satvikpendem 3y agoWhy not on the language? Rust has a borrow checker explicitly to avoid problems that are present in C, C++, and even Zig, such as using after free. Just because you can write mission critical software in a language doesn't mean that that language favors correctness. The language must be designed to do so.
- jorangreef 3y agoTo be clear, the domain of correctness is broader than memory safety. For example, TigerBeetle follows NASA's The Power of Ten Rules for Safety-Critical Code. We require that memory allocation failure be explicitly handled in the control flow, and that no dynamic memory allocation be used after initialization, that all resources (including memory) be explicitly limited, with no hidden allocations. Our language choices then came down to C or Zig. Zig made most sense. Zig's correctness philosophy (e.g. extremely explicit control flow) may be different to other languages. But Zig resonated with our own philosophy—in addition to the big examples already given above, we also noticed the little things (e.g. checked arithmetic enabled by default in safe builds).