std.stdio.writeln

Jonathan M Davis via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Mar 9 13:18:58 PDT 2015


On Monday, March 09, 2015 15:45:58 ketmar via Digitalmars-d-learn wrote:
> On Mon, 09 Mar 2015 14:48:19 +0000, John Colvin wrote:
>
> > Yet another excellent example of why we should abolish the comma
> > operator in D.
>
> or at least warn about it. producing a warning for such expression will
> ring a bell in programmers head: "compiler is unhappy. i definitely doing
> something wrong here!"

There's not much point in that. If someone is using the comma operator
correctly, then the warnings would be incredibly annoying. And if we value
avoiding comma operator-related bugs over letting folks take advantage of
its usefulness enough to consider such a warning, we might as well just
deprecate the comma operator and move towards removing it from the language.
Either it's there and useful but error-prone, or it's gone. In between just
annoys both groups.

- Jonathan M Davis



More information about the Digitalmars-d-learn mailing list