On Wed, Feb 25, 2009 at 2:28 PM, Yukihiro Matsumoto <matz / ruby-lang.org> wr=
ote:
> One possible idea is making symbols to belong to each namespace, like
> Common Lisp does, in that case,
>
> =A0obj.foo(bar)
>
> should be work as
>
> =A0obj.<namespace::foo>(bar)
>
> where <namespace::foo> 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 <namespace::foo> 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 =3D> 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=97presumably we're advanced
programmers and won't make silly mistakes=97and not a lot of thought as
to how a facility might be abused.

-austin
--=20
Austin Ziegler * halostatue / gmail.com * http://www.halostatue.ca/
               * austin / halostatue.ca * http://www.halostatue.ca/feed/
               * austin / zieglers.ca