[pypy-dev] Re: type problems
mwh at python.net
Thu Jul 10 18:52:07 CEST 2003
Samuele Pedroni <pedronis at bluewin.ch> writes:
> 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.
> 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
> 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.
Sure. This makes sense. But I'm not sure how (app-side) inheritance
fits into the picture. I guess the "delegation_func" could do this?
I'm also growing more convinced that what's now W_TypeObject.lookup
should be a multimethod (and lookup_exactly_here, too, I guess).
Get out your salt shakers folks, this one's going to take more
than one grain. -- Ator in an Ars Technica news item
More information about the Pypy-dev