DMD 0.148 release
Tom
Tom_member at pathlink.com
Sun Feb 26 07:31:21 PST 2006
In article <dtsgbj$1h6u$3 at digitaldaemon.com>, Kyle Furlong says...
>
>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?
I'd like to hear the answer :) .
Have to stay at the purists side on this one. I like bool to be bool cause I'm
that kind of guy that can't tolerate inconsistence (however I do tolerate it
cause don't have much of a choice right now) and I'm putting all my hope in D.
However both (the purist and the pragmatic) ways could coexist in the same
language I guess.
Tom;
More information about the Digitalmars-d-announce
mailing list