Hacker News
points by danielheath 1 day ago | 0 comments
One would never return “*” to signal an error in rust code (or any language with an option type).
[–] Scoring6931 1 day ago
Nothing precludes error handling in C. It's on the programmers to actually do it.
[–] danielheath 7 hours ago
If you forget to do it in C, everything still looks superficially right.

If you forget to do it in rust (or zig, or typescript, or any of the hundreds of languages with option types), your code doesn't compile.

Nothing precludes "simply do not fall off" when working off heights, either, but there's a reason safety harnesses are mandatory when working at heights in most of the developed world.

[–] Ygg2 1 day ago
Nothing precludes having legible programs in Brainfuck[1]. It's on programmers to actually do it.

[1] Other than the language itself.

Same goes for C, it's reliance on weakish type system is what causes its numerous fuckups.

[–] mxey 16 hours ago
Imagine every Rust program just calling unwrap on this result, and therefore the Rust library deciding to just never return an error. That’s analogous to what happened here.