On Tue, 1 Apr 2003, Michael Lazzaro wrote: > So I *really* don't think comparing the equality of references will be > a good idea, in P6. :-) > > John Williams wrote: > > [EMAIL PROTECTED] eq [EMAIL PROTECTED]; # true, for the reason I think > > # (the string-representation of the refs are equal) > > I'm pretty sure that breaks too, for the same reason. It puts both > sides in string context, which causes both sides to return the string > representation of the underlying array, _not_ the string representation > of the references themselves.
Yeah, I realized that might break after I sent the email too. But you're still beating around my bush. The main point is that the reference is a unique identifier for an object. At least, I haven't been able to think why it wouldn't be yet (barring persistence). So if you cede that point, achieving your identity comparison is a trivial matter of spelling the comparison correctly. Maybe its "$x.ref == $y.ref", since 'ref' is less common than 'id'. Maybe its something else. If we can store it somewhere, we can surely figure out a way to compare it. ~ John Williams
