zlacker

[parent] [thread] 1 comments
1. mrkeen+(OP)[view] [source] 2025-12-06 13:29:58
It's not unassuming. Rust is superior to many other languages for making this risky behaviour visually present in the code base.

You can go ahead and grep your codebase for this today, instead of waiting for an incident.

I'm a fairly new migrant from Java to C#, and when I do some kind of collection lookup, I still need to check whether the method will return a null, throw an exception, expect an out+variable, or worst of all, make up some kind of default. C#'s equivalent to unwrap seems to be '!' (or maybe .Val() or something?)

replies(1): >>neonsu+53
2. neonsu+53[view] [source] 2025-12-06 13:58:35
>>mrkeen+(OP)
Whether the value is null (and under which conditions) is encoded into the nullability of return value. Unless you work with a project which went out of its way to disable NRTs (which I've sadly seen happen).
[go to top]