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

Jacob Carlborg doob at me.com
Mon Sep 24 12:28:15 PDT 2012


On 2012-09-24 17:24, Andrei Alexandrescu wrote:

> I think my main problem with this is that I'm perfectly happy with the
> baseline, which has "tuple(" as the left delimiter and ")" as the right
> delimiter. I'd be more excited to invent notation if there was
> overwhelming or at least considerable evidence that the notation
> considerably helps certain use cases, or is very frequent. As things
> are, I'd be quite "meh" about suddenly adding lenses.

Declaring a tuple is still quire verbose can could really benefit from a 
shorter syntax.

(int, int) foo ();

Vs

import std.typecons;

Tuple!(int, int) foo (); // or what the correct syntax is

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list