mixed type list?

QAston qaston at gmail.com
Wed Nov 20 03:19:38 PST 2013


On Wednesday, 20 November 2013 at 11:07:27 UTC, seany wrote:
> Is there any way to represent mixed data (of various types) as 
> a single array?
>
> In scilab, we have list, and you can do list(integer, stringvar 
> ....) etc.
>
> Can you do something similar in D?  An idea is to use a struct 
> wil all possible data types, but think that is inefficient.
>
> Any other ideas?

You can use an array of http://dlang.org/phobos/std_variant.html .


More information about the Digitalmars-d-learn mailing list