On Wed, Jul 12, 2006 at 16:16:13 -0400, Aaron Sherman wrote: > Isn't that ~~? > > Per S03: > > Array Array arrays are comparable match if $_ »~~« $x > > ~~ is really the all-purpose, bake-your-bread, clean-your-floors, > wax-your-cat operator that you're looking for.
Not at all, because:
( [ 1, 2 ], 3 ) ~~ ( { 1 }, { 1 } )
It's matching, not equality.
> which is true. Ain't recursive hyperoperators grand?
It isn't a hyperoperator, it's just recursive ;-)
> > 2. is .id *always* a low level type representation of the object's value?
> > It's
> > specced that low level typed items have the same ID when they have the same
> > value. What about complex types?
>
> It cannot be for complex types or even strings... well, at least it
> I<must> not be I<if> we care about performance
That's orthogonal. .id is used for hash keys. If you're keying y
hubble images then they must be unique for some keyspace, and that's
where .id makes a mapping.
> =:= looks in the "symbol table" (caveat dragons) to see if LHS
> refers to the same variable as the RHS. Does this dereference?
> Probably not, but I'm not sure, based on S03.
Then it's a purely lexical opeation, and it doesn't even work for
my $x := $array[3];
$x =:= $array[3];
but i'll pretend you didn't say that ;-)
--
Yuval Kogman <[EMAIL PROTECTED]>
http://nothingmuch.woobling.org 0xEBD27418
pgpPMmzta8SWk.pgp
Description: PGP signature
