Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Rules for method resolution?
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Dan Sugalski  
View profile  
 More options Feb 13 2004, 11:49 am
Newsgroups: perl.perl6.internals
From: d...@sidhe.org (Dan Sugalski)
Date: Fri, 13 Feb 2004 11:38:07 -0500
Local: Fri, Feb 13 2004 11:38 am
Subject: Rules for method resolution?
So, as I dive into PDD15 as promised and get objects spec'd out so
they can finally be implemented, I've come across the problem of
method resolution.

We've got, or will have, two ways to invoke methods. The first is a simple:

   callmethod "methodname"

which calls the named method on the object in the object slot, does
all the funky lookups and whatnot, and slams the method PMC into the
. That's fine. May even mandate a:

   callmethod Pobject, "methodname"

which'll move the object to the object slot. Or not. But that's
beside the point.

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.
--
                                         Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
d...@sidhe.org                         have teddy bears and even
                                       teddy bears get drunk


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.