Changing the behavior of the comma operator

ed growlercab at gmail.com
Thu Mar 27 04:49:34 PDT 2014


On Thursday, 27 March 2014 at 11:43:36 UTC, ed wrote:
> On Thursday, 27 March 2014 at 11:32:45 UTC, Kagamin wrote:
>> On Wednesday, 26 March 2014 at 16:21:01 UTC, H. S. Teoh wrote:
>>> What we're proposing is to get rid of things like this:
>>>
>>> 	int x = 1, 5;	// hands up, how many understand what this 
>>> does?
>>
>> This proposal gets rid of this while keeping the comma 
>> operator.
>
> +1 to dropping to comma operator.
>
> This is what I would like to see illegal, forcing a refactor of 
> code:
>
>  if (((vertex= null), same.vertices)) for (blah){}
>
>
> Every time it catches me out and I misread the code to be:
>
> if(vertex == null && same.vertices) for (blah) {}
>
>
> Cheers,
> ed

s/== null/is null/


More information about the Digitalmars-d mailing list