If !in is inconsistent because of bool/pointer, then so is !

Simen Kjaeraas simen.kjaras at gmail.com
Sun Feb 8 08:05:07 PST 2009


On Sat, 07 Feb 2009 00:39:33 +0100, Rainer Deyke <rainerd at eldwood.com> wrote:

> (Of course '!=' (as the opposite of '==' as opposed to '=') is already a
> special case, so perhaps defining the '!<op>' operators individually is
> unavoidable.  'a !== b' as '!(a == b)' would work, but 'a != b' as '!(a
> = b)' would be very weird and inconsistent with other languages.)

>From the identity (a != b) == !(a == b), you could argue that
(a !<op> b) == !(a <op>= b), but I can hardly see that being better. :p


--
Simen



More information about the Digitalmars-d mailing list