DIP19: Remove comma operator from D and provision better syntactic support for tuples
ixid
nuaccount at gmail.com
Mon Sep 24 18:19:59 PDT 2012
What would a special case where the first level of tuple (with
higher levels being tuples in tuples) didn't require parens
break? This would be a beautiful syntax:
auto a = 1, 2; // A tuple of two ints
int, string fun(double, double d) {
return cast(int) (d[0] * d[1]), "hello";
}
auto a, b = 1, 2; // Two ints
auto a = fun(1.0, 1.0); // Tuple of 1 and "hello".
auto a, b = fun(1.0, 1.0); // An int and a string.
More information about the Digitalmars-d
mailing list