Algebraic Data Types in D?
Wyatt via Digitalmars-d
digitalmars-d at puremagic.com
Thu Jul 31 06:03:52 PDT 2014
On Thursday, 31 July 2014 at 11:42:21 UTC, Remo wrote:
> http://tech.esper.com/2014/07/30/algebraic-data-types/
>
> D already has product type it is struct.
> But D lacks sum type also called tagged-union.
>
> Do you think it would be possible to add something like this to
> D2 ?
I think you're looking for std.variant?
http://dlang.org/phobos/std_variant.html
(My understanding is it's undergoing some heavy work, so do be
aware of that.)
-Wyatt
More information about the Digitalmars-d
mailing list