Should the comma operator be removed in D2?

retard re at tard.com.invalid
Tue Nov 17 15:39:14 PST 2009


Mon, 16 Nov 2009 17:08:58 -0600, Ellery Newcomer wrote:
> dsimcha wrote:
>> 
>> Axe.  Looks like the only things it's good for are making code
>> undreadable and abusing for loop syntax to...
>> 
>> Make code unreadable.
>> 
>> When the heck would this be significantly more readable, safer, or more
>> concise than doing the equivalent without it?  Also, from previous
>> discussions I vaguely remember it's constraining other parts of the
>> syntax.
> 
> I've used them occasionally with regard to ref parameters
> 
> Object foo(Object bar, ref bool flag);
> 
> while( guard(bizz) && (fizz = foo(bizz,ok), ok)){}
> 
> although I suppose it doesn't score so highly on the readable scale..

This kind of code wouldn't go pass the code review process at my 
workplace. It might be valuable principle for your employer if you're 
paid by the line, though..



More information about the Digitalmars-d mailing list