unsigned policy
Andrei Alexandrescu (See Website For Email)
SeeWebsiteForEmail at erdani.org
Wed Feb 14 13:11:33 PST 2007
Derek Parnell wrote:
> On Wed, 14 Feb 2007 12:24:59 -0800, Andrei Alexandrescu (See Website For
> Email) wrote:
>
>
>> x = y; // should not work, use x = cast(bool)y or x = y ? 1 : 0
>
> Did you mean ...
>
> int x;
> bool y;
> x = y; // should not work, use x = cast(int)y or x = y ? 1 : 0
>
> I'm in full agreement with your bool/int rules, BTW.
Yah, that's correct, thanks for the fix. Let's hear what Walter has to
say :o). In fact, I suggest that we all think of some compelling cases
one way or another. We all know of the mess created by implicit
bool->int in C++, so let's look for some "positive" example. On both sides.
Andrei
More information about the Digitalmars-d
mailing list