|
|
|
|
|
by grumpyprole
1046 days ago
|
|
> It's an example of what Haskell's IO API might look like if it used sum types for error handling rather than throwing exceptions. Apologies I missed that bit, it is indeed a perfectly reasonable API. > So you're saying that you'd configure the compiler to do exactly the same checks that Go error linters do...none of which have anything to do with sum types. We are arguing semantics as to what constitutes a "handled error". If a user chooses to explicitly throw away the error and not use the value, then you are arguing it is not handled. I am arguing that it has been handled (and checked as such). Either way sum types are a step in the right direction, despite all the shortcomings and unsound type systems of "practical" languages. |
|