Time to nail this.

We need namespaces. Duh. We talked about this in the past.

So, here's what I'm proposing. It'll be formalized into a PDD once we hash things out.

*) 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.

*) Namespaces and sub-spaces can be overlaid or aliased

So code can, for example, throw a layer over the ['foo'; 'bar'; 'baz'] part of the namespace that gets looked at first when searching for something. These layers can be scoped and shifted in and out, which means its possible to have two or more ["IO"] namespaces that have completely (or partially) different contents depending on which space is in use.

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

*) The top-level namespace ["__INTERNAL"] is taken. It's ours, don't touch in user code.

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

*) 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

*) Parrot's base library goes into ["_INTERNAL"; "Parrot"]


If this is fine, we can then go on to fight^Wdiscuss the standard aliases and such. I think it's time to start the parrot library project back up, which means we ought to deal with library versioning and such too.
--
Dan


--------------------------------------it's like this-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to