logoalt Hacker News

woodruffwyesterday at 9:53 PM1 replyview on HN

I don’t think the basic idea that Zig is less safe than a language like Rust (and therefore has different classes of “endemic” bugs) is controversial among Zig programmers.

The points they make around explicit defers are a lot more subtle than it being too many lines. Quoting:

> For Zig code, when exactly should we be running the cleanup code? If we're passing the same *T to many different functions, how do we know when it's no longer accessible and can be cleaned up? How does it work when some functions need to continue to reference the memory after the function is called?


Replies

overgardtoday at 4:40 AM

I've seen plenty of projects in C with way more complexity and far fewer issues than Bun, and C is definitely less safe than Zig. Memory management strategies are not new things! Professional developers learn to use their tools effectively. After reading the article and the connected context I just get the sense that this is a poorly developed codebase. A bad carpenter blames his tools and all that. I agree with the article that this seems to be about culture. A vibe coded port that explicitly uses unsafe in Rust is not going to be any safer.

I mean look, I'm sorry, but at this point I cannot take the Bun project seriously. If people are bragging about not-bothering-to-read-the-code and practicing atrocious engineering with LLMs, and then they're like "it's the language's fault!". Yeah, no, I don't buy it. Plenty of people can write applications in languages without automatic memory management without endemic use-after-free issues. As vibe coders like to say: skill issue.

show 1 reply