Jim Weirich wrote:
>
> On Feb 25, 2009, at 2:08 PM, Ola Bini wrote:
>
>> - How would this interact with send?
>> - How would it interact with other introspection facilities? 
>> Kernel#method ?
>>    Basically, what is the runtime behavior of all metaprogramming and 
>> introspection features here...
>> - Do I understand correctly that this is supposed to be a lexical 
>> effect, and not a dynamic one?
>
> Ola asks some great questions.  I have a few as well:
>
> (1) If two selector namespaces are in scope, and they both define a 
> method of the same name, which one takes precedence?  (i.e. Assume 
> that namespaces X and Y both defined a method "to_xml" on Object, and 
> that both are in scope.  Which version will be invoked?)
>
> (2) With a particular namespace in scope, will there be a way to 
> explicitly invoke a conflicting method from a different namespace 
> (i.e. Assume that namespaces X and Y both define a method "to_xml" on 
> Object.  Will there be a way to explicitly invoke the Y version of 
> "to_xml" from code that is currently in the scope of the X namespace.)
>
Good questions. At this point I'm getting confused about terminology.

We have all been using the words "namespace" and "selector" pretty much 
interchangeably in this thread.
I'm becoming a bit confused about talking about several selectors being 
in scope at the same time here. One of my points in the other mail I 
sent was that there is no real way to know what a namespace contains 
until runtime - and the parser needs to know at parse time - otherwise 
it can't choose the right namespace. Which is why I thought there could 
only be _one_ namespace active at the same time.

For more reference, I urge a look at Common Lisp packages.

Cheers

-- 
 Ola Bini (http://olabini.com) 
 Ioke creator (http://ioke.org)
 JRuby Core Developer (http://jruby.org)
 Developer, ThoughtWorks Studios (http://studios.thoughtworks.com)
 Practical JRuby on Rails (http://apress.com/book/view/9781590598818)

 "Yields falsehood when quined" yields falsehood when quined.