Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> 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



Why 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.


To 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).




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: