DMD 0.148 release

Derek Parnell derek at psych.ward
Sun Feb 26 14:57:40 PST 2006


On Mon, 27 Feb 2006 00:34:07 +0200, Georg Wrede wrote:

> Derek Parnell wrote:
>> On Mon, 27 Feb 2006 04:36:08 +1100, Charles <noone at nowhere.com> wrote:
>> 
>>>  > Can't we simply treat zero as false and non-zero as true as we C
>>>  > programmers always do?
>>>
>>> I agree, I still don't get what the 'true bool' fuss is about .
>> 
>> Should a coder be allowed by the compiler to perform arithemtic 
>> operations  of booleans?
> 
> No.
> 
> And that's why nobody (to my knowledge) is opposing _having_ booleans.

Then why the objection to having them as booleans rather than numbers?

One purpose for having a compiler is to help coders reduce the number of
mistakes that they could make. And one of the reasons we have a type system
in compilers is to catch a set of potential mistakes that coders make. If
we pretend that booleans are number types, we deny an opportunity to catch
potential coding mistakes.

-- 
Derek
(skype: derek.j.parnell)
Melbourne, Australia
"Down with mediocracy!"
27/02/2006 9:53:51 AM



More information about the Digitalmars-d-announce mailing list