News for hackers. Stuff that matters.
Re:Railway-Oriented Programming (2015) by KirinDave on Monday June 18, 2018 @01:30PM (#17340018)
> 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.

There are no comments on this comment yet.