Darren Duncan wrote:
Now I seem to remember reading somewhere that '===' will do what I want, but I'm now having trouble finding any mention of it.
So, what is the operator for reference comparison?

As someone who wrote a tool that uses refaddr() and 0+ in Perl 5 to achieve the same thing, I agree with the need for such an operator.


I think that =:= compares *lexical* identity is fairly clearly spelled out in S03. However, we need a way to compare *value* /identity/ (not equality or equivalence), without being subject to overloading etc.

Of course, actually comparing two `ref' or `Ref' objects for pointing
to the same place is achieved via `==' (or, if === is used, ${$ref1} === ${$ref2} or the P6 equivalent :) )


Sam.

Reply via email to