We sometimes return optionals in a handle statement, meaning we still have to match afterwards.
This makes them rather verbose, as we just move the problem (instead of dealing with errors we have to deal with an optional)
Description of the feature
Either always:
return a value in a match arm (it must be an expression)
exit the function
This means that if we assign to a value, it is no longer an optional, as we are guaranteed to either get a value or exit the function.
Current Issue
We sometimes return optionals in a handle statement, meaning we still have to match afterwards. This makes them rather verbose, as we just move the problem (instead of dealing with errors we have to deal with an optional)
Description of the feature
Either always:
This means that if we assign to a value, it is no longer an optional, as we are guaranteed to either get a value or exit the function.
Description of potential solution
This must be checked in the type checker.