[1]: https://ziglang.org/learn/why_zig_rust_d_cpp/#no-hidden-allo...
[1]: https://ziglang.org/learn/why_zig_rust_d_cpp/#no-hidden-allo...
I'm sure Zig is great, but I don't see from what you linked how that changes what I said.
All code alloc'ing mem needs to deal with this potential failing: the dev can choose to "panic/die/exit/etc" or possibly a different strategy can be chosen (display smth in the UI, not allocating memory, etc).
Rust has this "nicely return a Result, instead of exceptions/panics/etc", in most cases, but not in the case of mem alloc. That a big difference between Zig an Rust.
Now Rust has alternative methods for mem alloc that return a Result: but these are not the default and thus hard to discover. This is "unsafe behavior by default" in Rust. This is special, as Rust usually promotes the safe path.
see https://github.com/rust-lang/rust/issues/48043 and https://github.com/rust-lang/rust/pull/80310
This is what Zig has as default behavior.