2 ms·
It doesn't have to be fully specific to the error type, you can have a "must use" attribute that can be applied to any type, and then support for that in the co
by chlorion 5y ago
It doesn't have to be fully specific to the error type, you can have a "must use" attribute that can be applied to any type, and then support for that in the compiler. This allows it to be used for other things like Option as well, and anything else that should cause an error if ignored.
- randomdata 5y agoCertainly you can bake monadic-type behaviour into the language, but at that point the Result type is superfluous and provides a weaker interface than what language constructs could provide on their own.