Hacker News new | ask | show | jobs
by IshKebab 409 days ago
Isn't `unreachable` in Zig like in C? So very bad things can happen if you overflow.

This sort of code makes me nervous about Zig.

1 comments

In safe build modes (ReleaseSafe or Debug) it's an immediate panic, equivalent to calling `.unwrap()` on a None in Rust. In unsafe build modes it's undefined behavior.
Well exactly.