3 ms·
I consider the error types to be a useful information that should absolutely be part of the method type. If a method can fail on IO that's different than if it
by esarbe 7y ago
I consider the error types to be a useful information that should absolutely be part of the method type.
If a method can fail on IO that's different than if it cannot fail. And the surrounding code has to account for that.
So, you might think that the methods are interchangeable if the error type is not present in the signature but this is actually wrong. Different failures have to be handled differently.
(I assume that you are /not/ talking about valid error cases in the problem domain that also might have to be handled)
- deleted 7y ago[deleted]