Le Thu, May 20, 2004 at 12:03:52PM -0700, le valeureux mongueur TOGoS a dit:
> Should aggregate PMCs (like PerlHash) be able to take
> PMCs as keys? I mean so that:
> 
>   $P0 = $P1[$P2]
> 
> where $P1 is a PerlHash, would work. The way it works
> now is that it complains that you can't use a PMC as a
> key. So my compiler has to spit out about 20 lines of
> code for every sub-element access that tries to guess,
> depending on the type of the key and the type of the
> aggregate, whether to take the string value or the
> integer value of the key before using it. Which is
> totally ugly.


I have proposed a patch that was dismissed by Leo on the ground
that it would affect performance. I thought that the general case
was non composite keys and that parrot should be optimized for
that. So avoiding generating more IMC code to create keys seemed
good to me. But no one came forward to defend my idea so I thought
it was bad and did not advocate it further. I don't know if it
still works though.

See: http://tinyurl.com/yu8k8


--
 stef

Reply via email to