From: Yehuda Katz Date: 2009-02-26T08:45:17+09:00 Subject: [ruby-core:22523] Re: YASNP (Yet Another Selector Namespace Proposal) --000e0cd14494d113c50463c6d60a Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 2009/2/25 Gary Wright > > On Feb 25, 2009, at 5:28 PM, Charles Oliver Nutter wrote: > >> >> Yes, sounds like you're thinking along the same lines I am..."SEL_CALL" >> node that knows how to do namespace searching in addition to type hierarchy >> searching. >> > > During this modified method lookup process... > > ...would namespace modules be searched before/after the object's singleton > class? singletons would win. > ...would super in a singleton method search any namespace modules (if the > singleton > class was searched before namespace modules)? since it is lexically scoped, it would depend on where the singleton method was defined. > ...would namespace modules be searched before/after the singleton hierarchy > (for classes)? good question. it should probably work like any object... > ...would super in a method defined in a namespace module search any > 'nested' namespaces? remember that namespaces are lexical. Once you exit the lexical scope, super reverts to its normal meaning. > > > I don't have an opinion at the moment as to what might be the right answer > to those > questions but I think any proposal would need to address those questions. > > Gary Wright > -- Yehuda Katz Developer | Engine Yard (ph) 718.877.1325 --000e0cd14494d113c50463c6d60a Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

2009/2/25 Gary Wright = <gwtmp01@mac.com>

On Feb 25, 2009, at 5:28 PM, Charles Oliver Nutter wrote:

Yes, sounds like you're thinking along the same lines I am..."SEL_= CALL" node that knows how to do namespace searching in addition to typ= e hierarchy searching.

During this modified method lookup process...

...would namespace modules be searched before/after the object's single= ton class?

singletons would win.
=A0
...would super in a singleton method search any namespace modules (if the s= ingleton
=A0 class was searched before namespace modules)?

sin= ce it is lexically scoped, it would depend on where the singleton method wa= s defined.
=A0
...would namespace modules be searched before/after the singleton hierarchy= (for classes)?

good question. it should probably work= like any object...
=A0
...would super in a method defined in a namespace module search any 'ne= sted' namespaces?

remember that namespaces are lex= ical. Once you exit the lexical scope, super reverts to its normal meaning.=
=A0


I don't have an opinion at the moment as to what might be the right ans= wer to those
questions but I think any proposal would need to address those questions.
Gary Wright



--
Yehuda Katz
D= eveloper | Engine Yard
(ph) 718.877.1325
--000e0cd14494d113c50463c6d60a--