Skip to content
Prev 50594 / 63424 Next

RFC: Declaring "foo.bar" as nonS3method() ?!

On 12/06/2015 7:16 AM, Kurt Hornik wrote:
I think that would break a lot of existing scripts.  I think the logic
should be something like this.

For each class in the class list:

Search backwards through the environment chain.  If the current location
is a package environment or namespace, look only in the registry.  If
not, look at all functions.

If that search failed, try the next class.

A variation on the test is:  If there's a registry in the current
location, look there.  But I think the registry is not on the search
list, so I'm not sure that would work.

This assumes that we keep separate registries in each package; if we
merge them into one big registry, it gets harder.  I'm not familiar
enough with the code to know which way we do it.

Duncan Murdoch