3 ms·
For null, there are nullable reference types now. Exceptions are here to stay though. I don't see how you could retrofit something like Rust's Result on top of
by svick 4y ago
For null, there are nullable reference types now.
Exceptions are here to stay though. I don't see how you could retrofit something like Rust's Result on top of .Net. (Also, .Net has a pattern that's an alternative to exceptions: `bool TrySomething(out T result)`. But it's quite limited, in several ways.)
- ttymck 4y agoAre you suggesting a Result type and Exceptions are mutually exclusive? Scala bolted `Either` (a Result type) on top of Java, and it worked exceptionally well in my experience.