Should we deprecate comma?
bearophile
bearophileHUGS at lycos.com
Mon Mar 24 11:38:35 PDT 2014
w0rp:
> Yes, I am with you on this. I prefer tuple(1) over (1, )
I don't think people are advocating for the "(1, )" syntax.
Regarding the "tuple(1)" syntax, it is one of the alternative
syntaxes you can find in the DIP. One disadvantage of the
"tuple()" syntax is that it's a little long, so if you have an
array of tuple literals it becomes a little wordy:
auto a = [tuple(1, 2), tuple(3, 4), tuple(5, 6)];
But of course having a good built-in "tuple()" syntax is much
better than the current situation without any syntax.
Bye,
bearophile
More information about the Digitalmars-d
mailing list