DMD 0.149 release

Kyle Furlong kylefurlong at gmail.com
Tue Mar 7 16:55:26 PST 2006


Georg Wrede wrote:
> 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")) {}
> 
> ???

I suggest you read this : http://www.digitalmars.com/d/type.html before you make an ass of yourself. Oops, too late.



More information about the Digitalmars-d-announce mailing list