DMD 0.148 release

Bruno Medeiros daiphoenixNO at SPAMlycos.com
Tue Feb 28 07:09:37 PST 2006


Walter Bright wrote:
> "Ivan Senji" <ivan.senji_REMOVE_ at _THIS__gmail.com> wrote in message 
>> The problem in all these bool wars so far is I never saw an argument that 
>> would be against true booleans (while(BooleanExpression) and all that...).
>> The arguments like:
>> while(true) is much much bigger than while(1) or
>> while(a)    is much smaller and more understandable than while(a>0)
>> //hm while(a) is actually while(a!=0) but did I really mean a>0?)
>> and like that don't really count.
>>
>> Adding true booleans makes no code break, only adds compiler errors that 
>> make  a coder think more about what he is doing and require awfull changes 
>> from if(b) to if(b!=0) and stop him from doing things like adding two 
>> bools or adding an int to a bool.
> 
> Like I said, I never looked back with nostalgia upon Pascal after using C 
> <g>. I know many people think the wordier versions are more readable. I 
> don't. I'm also very reluctant to abandon things that may have contributed 
> to C being wildly popular and burying Pascal in an unmarked grave out in the 
> desert.
> 

Thinking about that (the Pascal verbosity), I find that in most cases I 
agree that wordier versions are less readable, however, that is only 
*usually*, not in all situations. It really has to be considered on an 
individual case, not on a general basis.
For instance, I abhor the BEGIN/END construct, so much that I 
immediately distrust any language with it (yes Ruby, that means you..). 
I also find stuff like VAR and THEN annoying, but in the case of '1' vs 
'true', I prefer 'true'.
We can't go completely against the way of wordiness, because that would 
be the road to obfuscation. Do not generalize, look at each case 
appropriately. And harmony is the key.



-- 
Bruno Medeiros - CS/E student
"Certain aspects of D are a pathway to many abilities some consider to 
be... unnatural."



More information about the Digitalmars-d-announce mailing list