On Tue, 2004-09-07 at 09:26, Dan Sugalski wrote:

> *) Namespaces are hierarchical
> 
> So we can have ["foo"; "bar"; "baz"] for a namespace. Woo hoo and all 
> that. It'd map to the equivalent perl namespace of foo::bar::baz.
[...]
It's also possible to hoist a sub-space up a few levels, so that the 
> ["IO"] space and the ["__INTERNAL"; "Perl5", "IO"] namespace are the 
> same thing

This sounds fine, except for the higher level question of who controls
the root. That is, does a module Python decide to define its bits in the
"Python" space AND export them to the root?

The other way to go is to say:

        #!/usr/bin/perl6
        use __Python::os;

Which has the interesting result that no one ever need touch the root.
There's simply a search path that each language uses that would default
to [] and its own ["__Internal";$language].


> Alternate names are fine. I'm seriously tempted to make it ["\0\0"]

Heehee. I don't think __INTERNAL is so bad.

> *) Each language has its own private second-level namespace. Core 
> library code goes in here.
> 
> So perl 5 builtins, for example, would hang off of ["__INTERNAL"; 
> "perl5"] unless it wants something lower-down

Ok, so that's where "split" would go, right? Does that mean that if, in
Python, I wanted to use Perl 5's split, I'd just have to:

        import __INTERNAL.perl5
        list = split '\\ba(?=b)', the_string, 5

? That's some nifty beans!

Sounds great, Dan.

-- 
â 781-324-3772
â [EMAIL PROTECTED]
â http://www.ajs.com/~ajs

Reply via email to