downs wrote: > This is NOT a reason against !in. In fact, this so-called > "inconsistency" is already present in the language. If we remember, > !pointer already transforms it into a boolean, so it would actually > be more consistent if !in changed the return type to bool.
I agree. 'a != b' is short for '!(a == b)'. 'a !is b' is short for '!(a in b)'. For consistency, 'a !in b ' should be short for '!(a in b)'. I'd even go so far as to say that 'a !+ b' should be short for '!(a + b)', although I can't think of a use for the '!+' operator. a !<op> b == !(a <op> b): simple, consistent pattern. a !<op> b == !(a <op> b), but only for <op> in some limited set that doesn't include all operators with which you might want to use the pattern: less consistent; requires memorization. -- Rainer Deyke - rain...@eldwood.com