de facto keywords

Janice Caron caron800 at googlemail.com
Sat Apr 5 13:55:25 PDT 2008


On 05/04/2008, Paul D. Anderson
<paul.d.anderson.removethis at comcast.andthis.net> >  > I agree there
should be syntactic support for tuples, but I don't think
>  > the "tuple" keyword is best. Instead, what about (int, float, 3) being a
>  >   tuple?

I use std.typecons.Tuple quite a lot (...ever since I discovered it!),
as it allows functions to return multiple values.

I dislike the /other/ meaning "tuple", which is a random mix of types
and values - e.g. (int, float, 3). I'd rather they were called
something else - if indeed they need a name at all! (I suspect they
don't. The phrase "variadic template parameters" describes what they
are just fine).



More information about the Digitalmars-d mailing list