Hacker News new | ask | show | jobs
by bruce343434 1203 days ago
Sum types are much more than just error handling though. They can be used to describe any structure made of substructures, where you have _multiple kinds_ of substructures. The type of such a structure is the _sum_ of all the substructure types.