Strict Equality, Lax Equality, Equivalence, Sameness: IS and =

Carl's Rebol Blog on the topic of != isn't currently taking comments (or at least, not the one below, it said REBOL terminated), but here's what I tried to say there:


In the past, I spoke about <> as being too "tag-looking". If {} is empty string, why wouldn't <> be empty tag?

In time, I drifted away from that particular religion, and made peace with <> being a symbolic WORD! and not a TAG!. The specific tag escaping proposal I have in mind would allow you to put spaces in tags, e.g. <{ spaced out tag }>, and thus <{}> could be an empty tag if you really needed one.

For R3-Alpha, the problems with != go deep. Firstly, if you bow to C's influence in this way, then people will expect == and != to be a paired set. Yet that would not be so, as = and != would be a pair, and then == and !== would be a pair.

That's not going to please people. However, permitting != as a synonym for <> is less evil if equality is reimagined as laid out here.

At which point, there's no == to be inconsistent with, and I guess I'd throw my hat into the ring for "what harm does it do to have it". As @AntonRolls says, it could make comparisons to a tag look better.

foo <> <tag>
foo != <tag>

I'm not convinced I support ! being in the box for NOT, however. Yet people do it on their own. We've been experimenting with "ternary" non-evaluative operations as condition ?? value1 !! value2, an idea from Perl6... and the idea would be that this does not evaluate blocks. So x > 2 ?? [a b c] !! [d e f] would be equivalent to either x > 2 [[a b c]] [[d e f]].