Killing the comma operator
Timon Gehr via Digitalmars-d
digitalmars-d at puremagic.com
Tue May 10 14:30:35 PDT 2016
On 10.05.2016 11:52, Mathias Lang wrote:
>
> It seems there is a reasonable ground to kill it. However, there have
> been legitimated concern about code breakage, so we would like to hear
> from other people:
>
> Do you like comma expressions,
It's sometimes a useful thing to do. But every usage of the comma
operator, e.g. (e1,e2,e3), could just be e.g. (e1,e2,e3)[$-1] instead
with tuple syntax, and the latter is a lot more explicit.
The two usages that don't conflict with tuple syntax (i.e. as a
statement/inside a for-loop) could just be left in. They tend not to hurt.
> and think its presence in the language is
> more pro than con ?
No. Kill it.
More information about the Digitalmars-d
mailing list