DMD 0.149 release
Georg Wrede
georg.wrede at nospam.org
Tue Mar 7 16:47:38 PST 2006
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")) {}
???
More information about the Digitalmars-d-announce
mailing list