|
|
|
|
|
by itishappy
684 days ago
|
|
What does it mean to receive both value and error in the context of division? What about neither? The issue is not that they cannot be handled, it's that they can be. You included an entire extra branch and check for something that will never occur because they're legal values for your tuple type. I assume it'll be optimized out of this trivial example, but imagine writing a function to receive your tuple type in a codebase where you didn't create the tuple. ADTs prevent this entire worry because there is no way to represent illegal states. |
|
I don't see the issue?