HackerTrans
TopNewTrendsCommentsPastAskShowJobs

araoz

7 karmajoined vorige maand

comments

araoz
·9 uur geleden·discuss
the best way I've seen it described is like this: Bun wants to move fast and breaks things, Zig forces you to move slow and carefully.

Bun wants to ship new features ASAP (a shell lang, sqlite/pg client, etc), so they'd really want stuff like memory management out of the way. Zig forces you to think and deal with memory management, lifetimes, etc. Rust is just a better fit like w `Drop`, and Zig explicitly won't add `Drop` or anything similar.

Just like I wouldn't write a SQL database in Python, Zig is not the right tool for Bun. So there isn't really anything that "should be solved in Zig canonically". I'd say it's more in how Jarred want the project to move forward. Move fast and break things.
araoz
·9 uur geleden·discuss
AFAIK zig is not trying to be "better C++" (that is Rust), zig is more like "better C". a ergonomic low level lang with very little abstractions. zig explicitly doesn't want to be better C++ or rust
araoz
·vorige maand·discuss
I don't remember where it was said first, but I think the problem was not "AI drama" or that zig doesn't have "a good solution". It was more a mismatch between Bun's & Zig's goals. Bun wants to move fast & break things, even more now after getting acquired, but Zig punishes that. Zig requires you to handle everything carefully, there's no GC or big runtime to let you "break things", zig will let you just segfault.

Companies like TigerBeetle can and will benefit from zig's model.
araoz
·vorige maand·discuss
writergate was not smooth, a lot of things that moved over to writer (Writer.Allocating for instance) had no documentation and I had to go read the zig source code to figure it out. the docs were just "instead of That use This"
araoz
·vorige maand·discuss
I believe if the work you do fits well with Node & TS, you have no reason to use zig (other than for learning or curiosity). Like, if you don't need every drop of performance, memory layout & control, there's more downsides to using zig. Idk, cruds or "enterprise" stuff or websites don't benefit from zig.