On Fri, May 13, 2005 at 09:47:52PM -0400, Stevan Little wrote:
: Hello all.
: 
: In the processing of working with mugwump's shiny new perl6 OO Set.pm. 
: I realized that we do not currently have a way to uniquely identify 
: objects in Pugs like the way we have in perl5 (object stringification).

That's what .id is supposed to do, without the bogus numorstringification
semantics.  It should return something opaque that matches with ~~.

On the other hand, the point of =:= is that you can use it without
resorting to .id.  Basically

    $a =:= $b

should do the same as

    $a.id ~~ $b.id

Perhaps an id has a printable representation if you ask it nicely,
but you ought to be able to us an id as a key to an object hash without
going through stringiness, for instance.

In any event, it should be more like stringification than numification,
which is just asking for problems as soon as you get out of a uniform
memory model.

Larry

Reply via email to