DMD 1.019 and 2.003 releases

James Dennett jdennett at acm.org
Wed Jul 25 21:00:18 PDT 2007


0ffh wrote:
> Robert Fraser wrote:
>> 0ffh Wrote:
>> "if(x != 0)" is just more explicit than "if(x)", but not many people
>> use "if(b != false)" (unless you're that guy
>> where I wrote who wrote "while(m_userSubscribed ==
>> Boolean.FALSE.booleanValue())", which I sincerely hope wasn't
>> sincere), so being concise isn't bad as long as you're meaning is
>> clear. I think it looks ugly in for loops, though: 
> 
> So help me glod I did not, but I consider that code line to be sarcastic
> humour! :)
> 
>> for(int i = 100; i; i--) // Takes a second to mentally figure out
>> what's going on
> 
> Funny! I claim my brain parses the "i" /faster/ without the "=!0"!
> 
> "if (x)" takes me half a glance to parse and understand.
> "if (x!=0)" takes at least three quarters of a glance.
> 
> Maybe it's just a matter of being used to use this construct?

No; you'll find that many of those who advocate the explicit
approach are very used to both.  It's best not to assume that
people whose opinions differ from our own are less informed.

-- James



More information about the Digitalmars-d-announce mailing list