Dave Whipp wrote:
"Michael Lazzaro" <[EMAIL PROTECTED]> wrote:

After thinking about it a little more, I'll set myself on the "yes"
side.  And propose either '===' or ':=:' to do it.

Definitely '==='.
I could also see :== or =:= as well.

If we have

$obj1 = $obj2;

then presumably, ($obj1 == $obj2) is true (using '==' for your "value comparison" you discuss below). But ($obj1 === $obj2) is not necessarily true, becasue $obj1 could be a copy of $obj2, not an alias thereof.

However, if you do

$obj1 := $obj2;

then not only is ($obj1 == $obj2) true, but so is ($obj1 === $obj2)

So I could see = leading to == for comparison, and := leading to =:= for comparison.

There's actually a fourth concept: two (different) objects represent
the same value. (Actually, its the generalization of [1] and [2]).


Sameness is probably a more common operator then identical-ness
(I use the latter frequently: but I write a lot of code for testing and
debugging -- its my job). So perhaps the C<===> operator could
be used for comparison under the default equivalence-class of the
operands. I'd find it unintuitive, but I'm could get used to it.
If we wanted to test equivalence... I see === as OK, since (to me, at least) is is suggestive of the three-line equivalence symbol used mathematically. Of course, using Unicode, we could get away with using that symbol (which I don't know how to type...)



Dave.







Reply via email to