uniform tuple syntax

Adam D. Ruppe via Digitalmars-d digitalmars-d at puremagic.com
Tue Mar 24 16:57:52 PDT 2015

On Tuesday, 24 March 2015 at 23:07:29 UTC, Vlad Levenfeld wrote:
> Anything wrong with using {}? It looks good to me, does it lead 
> to any parsing ambiguities?

In this context, it would look like a delegate/function literal 
or perhaps the start of a scope in other contexts.

auto a = { arg1, arg2 }; // a is a function pointer, not a tuple
  // ( that won't compile cuz of a missing semicolon inside but 
still )

{ int }

would look like a block scope. Again, it wouldn't compile because 
the int is missing an identifier, but still, it would pose a 
parsing problem.

More information about the Digitalmars-d mailing list