Dan Sugalski writes: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
Can you say, in ["foo"; "bar"; "baz"], toss in a different namespace implementation for ["foo"; "bar"] and have that call some function with "baz"? Will this work if it's ["foo"; "bar"; "baz"; "quux"]?
Yes. Namespaces will work like any other aggregate accessed with a multi-level key -- they resolve as far as they can and pass on the remaining key to whatever things resolve to. Individual namespaces will likely be single-level affairs, so ['foo'; 'bar'; 'baz']] will have foo resolved by the top-level namespace, bar by whatever was in the foo slot, and baz by whatever was in the bar slot. (At which point you've got the final namespace and have to go look for whatever it was you were ultimately interested in)
--
Dan
--------------------------------------it's like this------------------- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk