kill the commas! (phobos code cleanup)

via Digitalmars-d digitalmars-d at puremagic.com
Wed Sep 3 08:20:55 PDT 2014


On Wednesday, 3 September 2014 at 14:47:21 UTC, ketmar via 
Digitalmars-d wrote:
> On Wed, 03 Sep 2014 15:33:02 +0100
> Nick Treleaven via Digitalmars-d <digitalmars-d at puremagic.com> 
> wrote:
>
>> It's better to just disallow them where they are bug prone:
> that is exactly what i mean. `for ()` can be an exception 
> though, to
> ease porting C/C++ code.

The conclusion was to make the comma operator return void when 
compiled with `-w`. I started implementing it here:
https://github.com/schuetzm/dmd/commit/33f4af3aee29cb2ced610d57f65c350fab306918

Unfortunately I don't understand DMD's internals enough to finish 
it, see my last comment on the PR:
https://github.com/D-Programming-Language/dmd/pull/3399#issuecomment-41612282

Maybe it is a good starting point for you.


More information about the Digitalmars-d mailing list