DMD 0.149 release | On bools

Bruno Medeiros daiphoenixNO at SPAMlycos.com
Wed Mar 8 03:27:38 PST 2006


Walter Bright wrote:
> "Derek Parnell" <derek at psych.ward> wrote in message 
> news:1o1ukrzuobjw5$.19cyl0ofx7fqs$.dlg at 40tude.net...
>> It seems that arithmetic operators also work on booleans so I guess the
>> operator list above is either not correct or this is a bug.
> 
> It's a bug. Sigh. It always takes me two tries to get this right :-( 
> 
> 
It's more than a bug. It is impossible to have arithmetic operators not 
work on booleans, if you have implicit conversion from bool to int. 
Because bools will be threated like an int. Isn't it right?

What we should have, is not have implicit conversion from bool to non-bool.

Let me recall a post I made, which I don't know if you read, for more info:
news://news.digitalmars.com:119/du9cnl$2h9j$3@digitaldaemon.com


-- 
Bruno Medeiros - CS/E student
http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D



More information about the Digitalmars-d-announce mailing list