TOGoS <[EMAIL PROTECTED]> wrote: [ anwser rearranged for readability ]
> --- Leopold Toetsch <[EMAIL PROTECTED]> wrote: >> TOGoS wrote: >> >> > Why not extend this to properties, too? >> >> > foo.hello becomes >> > >> > 'hello' >> > string >> > as-property >> >> Because that's an attribute access: >> >> $P0 = getattribute foo, "hello" > perl6-internals: the place to go to have people tell > you things you already know and not actually answer > your question at all. ??? Anyway - and to run the risk of stating again something you already know - here is a more verbose explanation: Perl has keyed access on hashes and arrays: $v = @a[$k] and $v = %a{$k} Both would translate to Parrot's: v = a[k] and the meaning "indexed" vs "hashed" access would be lost. To get that information into the opcode, Dan proposed to construct keys with an "as-xxx" bit to discern these two cases. You asked to extend that to properties (which are actually attributes). Well there is no ambiguity in accessing attributes. The attribute name is a string. There is no need to complicate things and replace an access with (mostly) constant strings by an extra key PMC which has to be constructed first. leo