[pypy-dev] Re: type problems
Michael Hudson
mwh at python.net
Mon Jul 7 19:07:07 CEST 2003
Samuele Pedroni <pedronis at bluewin.ch> writes:
> I agree with this.
>
> At 17:45 07.07.2003 +0200, Michael Hudson wrote:
>> I wrote this on the train yesterday. Some of it is a bit out of
>> date from talking on IRC today, but not all of it.
>>
>> A tip for making the multimethod implementation more comprehensible:
>> separate finding the method to call from calling it. Also,
>> consistently using common lisp terminology would help *me*, if
>> no-one else.
>
> it makes sense in general, one problem is that delegation is very
> specific to our multimethods, there is no such notion in CL,Dylan,...
Well, OK, but in other places. Applicable methods is one notion that
certainly is transferable.
I also notice that raising FailedToImplement is very like calling
call-next-method except that control flow never returns.
I think it makes sense to have compute-applicable-methods or whatever
be a generator.
>
>
>> And, finally, presuming that the implementation isn't going to
>> change drastically another four or five times, documentation would
>> be good! As Samuele and Armin are probably too close to write this,
>> perhaps I'll have a stab. Also, disentangling them from the
>> StdObjSpace implementation (if possible) would probably reduce the
>> general level of incomprehension.
>>
>> I want a spec for the applicable method computation algorithm -- a
>> sufficiently detailed description to allow implementation by someone
>> unfamiliar with our present one. I would also like an explanation
>> of why our algorithm is so flaming complicated.
>
> a formal spec for what it happens would be very good indeed. If we
> cannot write it then we should change the code so that we can write
> one.
This is part of the plan :-)
> 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,
M.
--
[3] Modem speeds being what they are, large .avi files were
generally downloaded to the shell server instead[4].
[4] Where they were usually found by the technical staff, and
burned to CD. -- Carlfish, asr
More information about the Pypy-dev
mailing list