4 ms·
One of my absolute favorite things about Rust is that nulls can't be used to circumvent the type system. They must be explicitly accounted for via an option typ
by Perceptes 10y ago
One of my absolute favorite things about Rust is that nulls can't be used to circumvent the type system. They must be explicitly accounted for via an option type in all cases. It's very hard to go back to a language that doesn't do this after getting used to it. I get so frustrated by constant null dereference errors when that entire category of error can be avoided.
- ArkyBeagle 10y agoI'd rather have explicit seperation of concern for UB-causing behavior than have a generic monad approach. Perhaps the examples I've seen in Rust just don't do that, because part of the appeal of Rust is that you sort of don't have to. That makes the cognitive load acceptable and documents all the UB prevention in source code. It's a habit arrived at from using formal instantiation protocols that were driven from external to the device being made - starting with RFC1695.