At 12:32 PM -0500 2/13/04, Gay, Jerry wrote:
> We also have to have a way to fetch the method PMC for a named method
for later use, which is where the interesting bits come in.

 This is required for a number of reasons, including Python, so we
 have to have it. The question is... *When* is the name resolved? That
 is, if we do:

findmethod P4, Pobject, "methodname"

 does the method PMC that gets stuck in P4 represent the method
 "methodname" for the object *at that point in time* or does it
 represent the method *at the time it is invoked*? That is, do we
 defer actual lookup until invocation, or do we resolve at method find
 time?

 This has some implications for when methods are overridden and
 namespaces swapped in and out, so it's (unfortunately) not an
 academic exercise.
 --

is it too much trouble to implement both, and give the HLLs a choice of which they call?

Well... the problem is that at the point of call you really don't know which type you have, and arguably ought not know, and just do whatever the PMC thinks is proper, presuming the find returned a PMC that Does The Right Thing.


Which answers the question, in its own way -- I'll make it "it depends" and leave it up to the class authors/language designers to decide what the heck to do with pre-looked-up methods.
--
Dan


--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to