On Sep 12, 2004, at 11:29 PM, Brent 'Dax' Royal-Gordon wrote:

Jeff Clites <[EMAIL PROTECTED]> wrote:
And again, I don't so much object to the idea of nested namespaces--I
just feel that they'll slow down symbol lookups, without giving us much
in return. I'm afraid we're adding complexity we don't need.

One thing this buys you is that you can have a Perl package:

    class Foo::Bar {...}

And in Python, refer to it with Python's syntax:

     bar = __Perl.Foo.Bar()

Since both of them boil down to the same thing:

["__Perl"; "Foo"; "Bar"]

True, but you'd also get this if the Perl and Python compiler authors decided to coordinate and compile down to the same thing, even without namespace nesting. And the Ruby people could decide to do the same, or not, as they prefer. That is, you could get this benefit even if Foo::Bar didn't imply the existence of a Foo namespace. (And frankly, you could even keep the idea a namespace is named by an array of strings, without implying nesting. That wouldn't have the performance impact of actual nesting.)


JEff



Reply via email to