I'm still restructuring the MMD infix functions and classes. Divide and floor_divide are done. But there is a problem:

* the Float PMC isa(scalar): it inherits almost all mathemtical functions from the abstract "scalar" PMC

* But e.g Parrot_Float_subtract_Complex isn't inherited automatically, only functions that have an equivalent in vtable.tbl are inherited but not MMD variants. I've currently hard-coded the _subtract_Complex functions to make tests happy. But when looking at classes/float.c you can see that e.g. MMD_ADD doesn't have the proper add_Complex function.

The goal is therefore to properly inherit all MMD variants of a function from an abstract base class like "scalar".

Alternatively we could make "scalar" a true type:

  pmclass Scalar noinit does scalar { ... }

and just forbid instantiation. With this declaration it should have a vtable and proper MMD entries, which are inherited dynamically via the MRO. But that increases the MMD_table so I'd rather keep it abstract.

Thanks,
leo



Reply via email to