Pair literal for D language

H. S. Teoh via Digitalmars-d digitalmars-d at puremagic.com
Thu Jun 26 22:43:43 PDT 2014


On Fri, Jun 27, 2014 at 05:35:40AM +0000, deadalnix via Digitalmars-d wrote:
> On Thursday, 26 June 2014 at 21:17:45 UTC, H. S. Teoh via Digitalmars-d
> wrote:
> >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
> 
> We'd make a step forward when we stop calling type tuples type tuples.
> They are not tuples, and do not contain (only) types.

I agree, but that's what they're called in the compiler source code, so
it's kinda hard to call them something else.


T

-- 
Guns don't kill people. Bullets do.


More information about the Digitalmars-d mailing list