On Wednesday, December 11, 2002, at 06:48 PM, Dave Storrs wrote:
Yes, I think it's settled, minus some arguing over the spelling of 'id'. I proposed '===' to see what would happen. Now having seen what would happen, I withdraw it. :-)Hopefully, this thread has been settled by Damian's pointing out the existence of id(), but could I put in a strong vote against the use of '===' for anything? It is far too easy to misread as ==, IMHO.
We have:
$foo == $bar; # numerically equivalent
$foo eq $bar; # stringically equivalent
$foo ~~ $bar; # (smartmatch) "equivalent"
$foo.id == $bar.id; # compare identity
There are no others, unless you roll them yourself. But note that ~~ is broad in meaning -- for each class, you can decide that "equivalence" means whatever you want it to mean.
MikeL