From: Yehuda Katz Date: 2009-02-20T07:49:11+09:00 Subject: [ruby-core:22273] Re: YASNP (Yet Another Selector Namespace Proposal) --000e0cd228b8abe23504634d5864 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit I'd be perfectly happy to have it take a block. -- Yehuda 2009/2/19 Charles Oliver Nutter > Yehuda Katz wrote: > >> I would be open to making it take a block, but I'm not aware of any >> use-case where that would be helpful, so I left it out at the beginning to >> reduce the need for extra ceremony. >> > ... > >> Again, I'm open to doing it a different way. I chose this initially >> because it makes it easier to implement at parse-time (which is required for >> performance) and because I can't think of any use-case where more granular >> application of namespaces would actually be useful, but I'd be fine with >> "use" taking a block if it moved the proposal forward. >> > > I suppose there's another argument in favor of an explicit bounding of the > "use" area: where do you *start*? If this is parse time, having it start at > the first "use" call seems a little odd; you'd almost want it to be a > whole-file pragma. But starting it at the beginning of the file seems just > as odd, since a use anywhere in the body changes all method dispatches. > > - Charlie > > -- Yehuda Katz Developer | Engine Yard (ph) 718.877.1325 --000e0cd228b8abe23504634d5864 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I'd be perfectly happy to have it take a block.

-- Yehuda
2009/2/19 Charles Oliver Nutter <charles.nutter@sun.com= >
Yehuda Katz wrote:
I would be open to making it take a block, but I'm not aware of any use= -case where that would be helpful, so I left it out at the beginning to red= uce the need for extra ceremony.
...

Again, I'm open to doing it a different way. I chose this initially bec= ause it makes it easier to implement at parse-time (which is required for p= erformance) and because I can't think of any use-case where more granul= ar application of namespaces would actually be useful, but I'd be fine = with "use" taking a block if it moved the proposal forward.

I suppose there's another argument in favor of an explicit bounding of = the "use" area: where do you *start*? If this is parse time, havi= ng it start at the first "use" call seems a little odd; you'd= almost want it to be a whole-file pragma. But starting it at the beginning= of the file seems just as odd, since a use anywhere in the body changes al= l method dispatches.

- Charlie




--
Yehuda Katz
Develope= r | Engine Yard
(ph) 718.877.1325
--000e0cd228b8abe23504634d5864--