[EMAIL PROTECTED] (Damian Conway) writes:
> > hashes can now take objects as keys and won't just stringify them.
> 
> Correct. But I believe that's only if the hash has a property that marks
> its keys as being objects, not strings:
> 
>       my %hash is keyed(REF);
> 
> And, even if that's the default, it still oughtn't apply to PAIRs.

So, uhm, what *does* happen if I do

$hash{$pair} = "foo";

Runtime error? And what if I do this:

   my %hash is keyed(REF);
   $hash{bless $pair, "NotAPairReally"} = "foo";
   ...
   for %hash.kv -> ($k, $v) {
       bless $k, "PAIR";
   }

Storing pairs as hash keys could lead to interestingly funky data
structures.  I'm sad that this is being ruled out.

-- 
I knew that a goodly number of train operating companies had
introduced quiet coaches, but I was still a little concerned
to find that my tickets were prominently marked NOT READING.
    - Geraint Jones

Reply via email to