Hacker News new | ask | show | jobs
by _urga 2506 days ago
> the memory bugs that exist in C also exist in Zig.

No, they don't. See Zig's release-safe mode.

Also: https://news.ycombinator.com/item?id=17184929

> the trade-off that the Rust offers is more in line with my values and my ethics.

By the way, it's awesome that you like Rust, but there's no need to imply there's something ethically wrong with Zig. Depending on the platform you're targeting, you may yet find a use for either language.

1 comments

release-safe doesn't prevent all memory bugs.
Sure, but then not even "safe" languages like JavaScript will prevent all memory bugs.

And to be fair, Rust does introduce memory issues of its own in terms of allocation strategy. For certain projects, Rust would not be considered "safe" with respect to memory.

Zig's release-safe mode is worlds away from "the memory bugs that exist in C".

See also: https://github.com/ziglang/zig/issues/2301