DMD 0.148 release

Kyle Furlong kylefurlong at gmail.com
Sun Feb 26 07:09:41 PST 2006


Georg Wrede wrote:
> Derek Parnell wrote:
>> Walter is still living in the C/C++ past with this concept, which is  
>> strange seeing he has implemented so many progressive concepts in D.  
>> Boolean as an integer is just retro.
> 
> So am I.
> 
> Booleans have to be int. A boolean may have any "numeric" value, but if 
>  implicitly cast to a numeric type, it should return 1 or 0.
> 
> D IS A PRACTICAL PROGRAMMING LANGUAGE.
> 
> Forcing booleans to be 1/0 all the way is just academic, purist, 
> impractical bigotry. About as smart as having the bit type.
> 
> (Besides, if booleans, as some say here, are _only_ abstract concepts, 
> then we might as well decide to have 0 mean true and 1 mean false. Heh, 
> there's only one truth but millions of lies! But we live in a world with 
> other people. And computers.)
> 
> Now, specifying 0 to mean false and everything else to mean not-false, 
> we go along with the hardware, the computer industry, half a century of 
> programming PRACTICE, and make life less difficult for anybody with a 
> professional programming background before moving to D.
> 
> Anybody who wants a tight-ass boolean, can define one for themselves.
> 
> ////
> 
> Now off to the Olympic Final in ice hockey: Finland - Sweden!!!

How would having a builtin, "purist" boolean type preclude using integers as a boolean type, in all the old ways you describe? 
Just as a curiosity, how have you been burned in the past by "purist" thinking like this to make you so passionately against it?



More information about the Digitalmars-d-announce mailing list