Allison Randal wrote:
We need a new syntax for the new metamodel. I'm thinking of:
setattribute obj, ["Foo"], "j", $P4
That works for me.
It uses the familiar keyed access syntax to allow multi-level parent
class names. We would need to add two additional vtable entries
get_attr_keyed and set_attr_keyed.
PMC* get_attr_keyed(PMC* key, STRING* idx)
void set_attr_keyed(PMC* key, STRING* idx, PMC* value) :write
_keyed is consistent, but not particularly descriptive - it's not
*really* a keyed access that we're doing here. _super maybe is better,
though I'm not sure I like that. Anyway, nobody seems to hate it so far
so I'll look at implementing it, if nobody beats me to that.
While you're at it, any chance of some suggested PIR syntax for calling
super-methods? Guess we need a _keyed/_super/_worreva variant of
find_method too, for this.
Thanks,
Jonathan