Pair literal for D language

H. S. Teoh via Digitalmars-d digitalmars-d at puremagic.com
Thu Jun 26 14:16:09 PDT 2014


On Thu, Jun 26, 2014 at 09:08:24PM +0000, Uranuz via Digitalmars-d wrote:
> Thanks for response. I was thinking that adding new statement for such
> feature is not very good too. Is there any recent discussions about
> tuble literals. There is proposal in wiki but I don't know if it will
> be accepted or not for some time. For now seems like it's better to
> alias tuple and use it instead of literal

Note that the word "tuple" in D is used to refer to two very different
things. What you want is essentially an anonymous struct, and should be
adequately covered by std.typecons.tuple.

Most of the tuple proposals, however, also seek to unify the
functionality of std.typecons.tuple with the so-called "compile-time
tuples" or "type tuples", which are a rather different beast (though
they do overlap with std.typecons.tuple somewhat). This is a lot more
complex, and probably beyond what you need anyway.


T

-- 
I am not young enough to know everything. -- Oscar Wilde


More information about the Digitalmars-d mailing list