DMD 1.019 and 2.003 releases

0ffh spam at frankhirsch.net
Wed Jul 25 02:59:23 PDT 2007


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?

Regards, Frank



More information about the Digitalmars-d-announce mailing list