From: Ondrej Bilka Date: 2009-02-25T07:00:48+09:00 Subject: [ruby-core:22426] Re: YASNP (Yet Another Selector Namespace Proposal) +1 to per-file block would only give some superflows intendation. use Foo:A do use Bar:B do use Baz:C do some code end end end On Tue, Feb 24, 2009 at 07:12:26PM +0100, Yehuda Katz wrote: > I don't think it's important that it be at the top of the file, but it does > need to be a keyword. > > -- Yehuda > > 2009/2/24 Charles Oliver Nutter > > > Yukihiro Matsumoto wrote: > > > >> +1 to have some kind of selector namespace (it's planned for 2.0 > >> anyway), but -1 for using block (or block-like syntax) to denote > >> namespace scope, because > >> > >> * it's not really a block > >> * too small granularity for namespace switching might bring confusion > >> > >> I'd prefer per file namespace switching. > >> > > > > I think it's impossible to have per-file without making "use" a special > > keyword, ideally at the top of the file. The block syntax made more sense to > > me because I knew exactly when it started and ended, and a 'use' later in > > the file did not affect code that came before it. Also, the example where I > > have both a namespace and a 'use' in the same file would be impossible if > > the use applied to the whole file. > > > > I'm willing to mock up anything else we want to try, including a whole-file > > version. > > > > - Charlie > > > > > > > -- > Yehuda Katz > Developer | Engine Yard > (ph) 718.877.1325 -- those damn raccoons!