3 ms·
The thing is, "sum types" really only works if you're familiar with the analogy between boolean algebra and arithmetic (why OR becomes +). Yes, they are disjoi
by jmite 12y ago
The thing is, "sum types" really only works if you're familiar with the analogy between boolean algebra and arithmetic (why OR becomes +).
Yes, they are disjoint union, but there's really no such thing as non-disjoint union in a statically typed language i.e. that's what makes it typesafe.
- tel 12y agoYou can have "non-disjoint unions" in typesafe languages, you just will be no longer capable of distinguishing between the types of the members.