News for hackers. Stuff that matters.
Re:Another non-argument in type systems by noblethrasher on Thursday October 25, 2012 @10:42AM (#4697805)
The concept of of a sum type is simple. It's just the type-theoretic notion of logical disjunction, how a particular language expresses that is sort of high-level implementation detail.

Java and its ilk do have sum types: they're called abstract classes; the derived types are the variants.

In C# (and probably Java) you can easily define both open and closed sum types simply by marking the base class constructor as either `public` or `protected`.

There are no comments on this comment yet.