2 ms·
> Either is a sum type. What if I don't want that. Product types work as well, if you want. But unless your return type is a monoid (or like, a semilattice may
by KirinDave 8y ago
> Either is a sum type. What if I don't want that.
Product types work as well, if you want. But unless your return type is a monoid (or like, a semilattice maybe?) then you're going to end up with Sum Types somewhere.
The vast, vast majority of software engineers and students work with sum types every day and they're totally fine with them. Most languages implicitly sum many values with null.