proposed syntax for tuple: t{} and TypeTuple: T{} (cf precedent of q{...})
Jack Stouffer via Digitalmars-d
digitalmars-d at puremagic.com
Tue Apr 5 09:56:15 PDT 2016
On Tuesday, 5 April 2016 at 05:45:08 UTC, Timothee Cour wrote:
> {} 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{...}
Tuple and AliasSeq are library types, so the chance that they
will be added into the language is slim to none.
More information about the Digitalmars-d
mailing list