Momentary Eh?! for a Dynamic Language Programmmer. Tuples vs Arrays. Just rambling.
bearophile via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Jun 23 14:58:07 PDT 2014
Ary Borenszweig:
> As a library solution I would do something like this:
>
> Union!(int, string)[] elements;
> elements ~= 1;
> elements ~= "hello";
Take a look at Algebraic in Phobos.
Bye,
bearophile
More information about the Digitalmars-d-learn
mailing list