[pypy-dev] Re: type problems
Samuele Pedroni
pedronis at bluewin.ch
Wed Jul 9 18:13:38 CEST 2003
At 18:07 07.07.2003 +0100, Michael Hudson wrote:
>Samuele Pedroni <pedronis at bluewin.ch> writes:
>
> > If dispatch table compression is the way we want to follow it
> > becomes important e.g. to know whether our rules are monotonic
> > (table compression algos I know about need that) and to reformulate
> > delegation relationships as some kind of subtyping rel.
>
>If you say so :-)
>
>I do notice delegation is what screws a naive attempt to memoize more
>of the applicable method computation.
>
>Cheers,
what I was thinking is that we should see whether a kind of class
precedence list (CL, Dylan terminology), MRO can be derived taking
delegation into account, e.g. for BoolObject it would be something like
Bool Int Any |here starts delegation| Float
it would not be just a list of types but a list of pairs
(type,delegation_func).
With complex it would likely become:
Bool Int Any Float Complex.
If we can construct such a list, then all the usual MM stuff applies more
naturally.
regards.
More information about the Pypy-dev
mailing list