DIP19: Remove comma operator from D and provision better syntactic support for tuples

Steven Schveighoffer schveiguy at yahoo.com
Mon Sep 24 08:54:00 PDT 2012


On Mon, 24 Sep 2012 11:47:09 -0400, Steven Schveighoffer  
<schveiguy at yahoo.com> wrote:


> I can say that I have *avoided* tuples as return values because I don't  
> want to type Tuple!(x, y) as the return type.  But I haven't come across  
> that need very much.  You can say "yeah, but what about auto?"  Cases  
> I'm referring to were to make interface declarations -- can't use auto.

To further this, I would love to see something where "quick POD structs"  
can be constructed using some builtin syntax.

For example:

{valid:bool, value:int}

which would be equivalent to Tuple!(bool, "valid", int, "value")

I would *definitely* like to see that.  This might be on par with the =>  
addition.

-Steve


More information about the Digitalmars-d mailing list