At 11:25 AM +0100 9/18/02, Graham Barr wrote:
>On Wed, Sep 18, 2002 at 10:15:20AM +0200, Dan Sugalski wrote:
>>  I've been thinking that we do need to have an extra flag to note
>>  whether a key element should be taken as an array or hash lookup
>>  element. The integer 1 isn't quite enough, since someone may have
>>  done a %foo{1} and we only have that in as an integer key.
>
>I agree. Using integer key == array and string key == hash is not
>enough imo.  What about a hash that is index by object, not a string.
>What about an array that is index by strings ? ie
>
>   my @array is indexed('a'..'z');
>
>So if parrot wants to provide a method for compound keys, then the
>HL should be able to specify what type it is expecting each level
>to be.
>
>But the question also exists how this flag should be used/checked.

The variable itself is responsible for checking at runtime, though we 
can and will do compile-time checking when we can. Since it's a flag 
in the key, it's passed into the variable's vtable method, and there 
to check if it chooses. (Which it ought, in most cases)
-- 
                                         Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                       teddy bears get drunk

Reply via email to