From: Austin Ziegler Date: 2009-02-26T22:14:03+09:00 Subject: [ruby-core:22540] Re: YASNP (Yet Another Selector Namespace Proposal) On Wed, Feb 25, 2009 at 2:28 PM, Yukihiro Matsumoto wrote: > One possible idea is making symbols to belong to each namespace, like > Common Lisp does, in that case, > > �obj.foo(bar) > > should be work as > > �obj.(bar) > > where means "symbol foo in that namespace", and its > correspondence can be modified by (dynamic) method definitions. Is there any reason that the above can't be made a valid syntax? I realize that we would also want a way to magic it so that we're not always having to type when we want to apply the #foo from namespace to obj, but I think that's part of what's been bothering me about this proposal: this seems harder to track down than necessary when bug fixing. I'm also not sure that file-based lexical scoping is entirely what we want. What do we want here: require 'my-namespace' using My::Namespace => String; require 'external-dependency' require 'my-dependency' If I'm a library writer, I'm not sure whether I want to have to specify the "using My::Namespace" line in each of my internal dependencies, but at the same time I don't want such things to go into external dependencies, either. I'm not opposed to selector namespaces, but I think I worry a little that a lot of the discussion has been focussing on what framework/library writers would do�presumably we're advanced programmers and won't make silly mistakes�and not a lot of thought as to how a facility might be abused. -austin -- Austin Ziegler * halostatue@gmail.com * http://www.halostatue.ca/ * austin@halostatue.ca * http://www.halostatue.ca/feed/ * austin@zieglers.ca