Type unions in D

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Thu Sep 17 07:46:01 PDT 2009


language_fan wrote:
> Wed, 16 Sep 2009 12:41:06 +0200, Fawzi Mohamed thusly wrote:
> 
>> On 2009-09-16 02:40:02 +0200, Justin Johansson
>> <procode at adam-dott-com.au> said:
> 
>>> A colleague of mine is suggesting that I really do take a closer look
>>> at D2 now but I'm not sure that I'm ready to go standing on the
>>> bleading bleading (the blood doesn't clot) edge just right yet. :-(
>>>
>>> JJ
>> Tango has variant (tango.core.Variant), and is D1, if that could be an
>> option for you.
> 
> Do the various variant structures presented here support recursive type 
> definitions such as lists? Is this done efficiently?

In Phobos' Algebraic, if you mention the type This inside the allowed 
types list, it will expand to the Algebraic's type. The support for 
complex constructs involving This is at the moment incomplete.

Andrei



More information about the Digitalmars-d mailing list