Post #4205298
2026-07-29 04:40 UTC
@idkrn@infosec.exchange
* There is not really a UB in languages like Java and Python (you're thinking of C), dereferencing null is well-defined, in Java it will throw a NullPointerException
* There is absolutely unwrap (or expect, etc) usage in any serious/realistic Rust code base
Replies (1)
-
@idkrn@infosec.exchange 2026-07-29 16:52
@bugaevc@floss.social yes I was using C as an example since I was assuming the reason the post exists in the first place was because of fil c. I don’t entirely agree with the initial post, but unwrap() isn’t the same as forgetting that something can be null. In this case you’re specifying you want a panic. You can basically replace every unwrap() with ?