Sam Ruby <[EMAIL PROTECTED]> wrote:

> But then you effectively morph the resulting bound method into a NCI
> instead of a PyNCI with the following line of code:

> bound_meth->vtable = Parrot_base_vtables[enum_class_Bound_NCI];

Yes. That's a general problem in all places, where the Parrot core
creates a PMC that might be overridden in a specific HLL.

I've proposed that we should have a table of core PMC => HLL mappings so
that depending on the current language a correct PMC class is created.

This is probably more important for scalar types, as basic math
operations are usually the same, then in object-ish code, where
differences tend to be bigger.

> Delegation is more appropriate in this instance, and would be able to
> handle both NCIs and PIR methods with equal ease.

How should default.pmc:get_attr_str() look like?

> - Sam Ruby

leo

Reply via email to