Theo van den Heuvel (>):
> Perl6 considers all entries as new, and the hash has 3 separate entries. Do
> I actually have to project my objects to strings to accomplish this?

You're putting arrays into a hash. When you put something into a hash,
it matters whether the object in question has *reference nature* or
*value nature*.

* If it has reference nature, the *reference* is used as the hashable thing.
* If it has value nature, the *value* (i.e. contents) is used as the
hashable thing.

It is important for the hash that whatever we use as the hashable
thing won't change over time. (Because if it does, then we won't find
the object again when we look for it later.) The value/contents of an
array can change over time, and therefore it cannot have value nature,
and therefore Perl 6 uses the reference to hash arrays, and therefore
you get three distinct things.

Hope that helps.

// Carl

Reply via email to