DMD 0.148 release
Kyle Furlong
kylefurlong at gmail.com
Sun Feb 26 12:27:29 PST 2006
Georg Wrede wrote:
> Tom wrote:
>> 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.
>
> Well, then we could skip the logical operators, right? No more && or ||.
> Since all booleans would be strictly 0 or 1, they'd become obsolete.
>
> And if booleans have to only be 0 or 1, then a whole lot of unnecessary
> conversions would be happening all over the place. Forget D speed.
Why would this happen?
>
> Also, D is supposed to be a _systems_language_ for chrissake! Any kernel
> writing would then have to forgo booleans totally.
>
I'm wracking my brain for any reason why this statement is even remotely true.
> I'm all for features in D that enhance productivity, but deliberately
> dumbing down the language is getting a bit too far.
>
How is it dumbing down the language to instruct it in the correct contraints of the boolean type?
> ---
>
> We've all had our fights with C, C++, and other related languages. But
> honestly, how many of us can confess to having problems with logical
> values?
>
> And if someone here has such problems, I suggest switching to VB.
>
> ---
>
> "Don't fix it if it ain't broke."
Many would contend that it is, as you say, "broke."
More information about the Digitalmars-d-announce
mailing list