DMD 0.149 release

Ameer Armaly ameer_armaly at hotmail.com
Tue Mar 7 18:02:11 PST 2006


"Georg Wrede" <georg.wrede at nospam.org> wrote in message 
news:440E29AA.1090408 at nospam.org...
> Jarrett Billingsley wrote:
>> "Georg Wrede" <georg.wrede at nospam.org> wrote in message 
>> news:440E1336.3050608 at nospam.org...
>>
>>>BTW, what does "Implicit casts of non-bool to bool disallowed" mean?
>>
>> It means you can no longer write
>>
>> bool x = 5;
>
> Shhhhhttt! Good-bye C/C++ folks!
>
> It's not like anybody would want to write exactly
>
>     bool x = 5;
>
> but more like
>
>     bool x = strcmp("foo", "bar");
>     if (!x) { /* do stuff */ }        // match
>     else { /* call the cops! */ }     // no match
>
> which, incidentally, is one of the more profound proposititions in any 
> C-derived language.
>
> The Old School Boolean C Logic was a perfectly functioning Concept. This 
> fact _alone_ was the reason "Bool" took so long to be "formally" 
> introduced into either C or C++. No regular programmer ever needed Prude 
> Bool, only the Superior Theoreticians Thought it Wise to force this upon 
> the language. It was profoundly useful as-is, and didn't need any pimping. 
> A language that purports to be "to-the-metal" just has to take into 
> consideration the fundamentals of [digital] life. And processor physics. 
> (Wanna abstract away that? Then go to Java or whatever.)
>
> The other night [in the D newsgroup, when it was getting hilarious] it 
> dawned to me, that quite [too] many of the vocatious NG-members never had 
> read their Boolean IT Fundamentals.
>
> Good Grief: "there's just too many instances in history where the 
> illiterati have dictated the outcome of otherwise intellectual 
> confrontations". Damn!!
>
> The ramifications of this (minor looking) modification are grave, I'm 
> afraid.
>
> Now what happens to
>
>     if (stcmp("foo", "bar")) {}
>
> ???
This has some merrit to it in my opinion; what's wrong with beeing able to 
cast an int to a bool; it allows the above stated functionality, but doesn't 
really present any harms that I can see. 





More information about the Digitalmars-d-announce mailing list