proposed syntax for tuple: t{} and TypeTuple: T{} (cf precedent of q{...})

Timothee Cour via Digitalmars-d digitalmars-d at puremagic.com
Mon Apr 4 22:45:08 PDT 2016


{} for tuples hasn't worked out since it was deemed ambiguous with
delegate syntax (was it for the case of empty statements/tuple?).

How about the following syntax instead:

----
{} // delegate (existing syntax)
q{...} // string literal (existing syntax)
t{...} // tuple(a,b) (proposed syntax)
T{...} // TypeTuple!(a,b) (proposed syntax)
----

See also [1] where i propose i{...} for a D analog of C++11's uniform
initialization.


[1] EMAIL: uniform initialization in D (as in C++11): i{...}


More information about the Digitalmars-d mailing list