Re:2 years of fiddling with Rust – critical thoughts
by Arnavion on Sunday November 06, 2022 @06:02PM
(#33498487)
I put "infallible" in quotes because a fallible API would be one that returns Option / Result where the None / Err encodes the failure. So on the surface these API look like they can't fail, except of course they do, by panicking.
[ Parent
| on HN ]
Re:2 years of fiddling with Rust – critical thoughts
by woodruffw on Sunday November 06, 2022 @06:09PM
(#33498564)
I understand the fallible/infallible distinction. My point was that the concept of fallibility/infallibility is not encoded into Rust's semantics: any function, even an "infallible" one, can panic (e.g. on stack overflow or an underlying memory allocation error).
(I think we're in agreement about fallible APIs being confusing and a footgun.)