At 10:13 AM -0800 1/13/04, Jeff Clites wrote:
Here are some notes on namespaces, picking up a thread from about a month ago:

On Dec 11, 2003, at 8:57 AM, Dan Sugalski wrote:

That does, though, argue that we need to revisit the global access opcodes. If we're going hierarchic, and we want to separate out the name from the namespace, that would seem to argue that we'd want it to look like:

find_global P1, ['global', 'namespace', 'hierarchy'], "thingname"

That is, split the namespace path from the name of the thing, and make the namespace path a multidimensional key.

I definitely agree that we should have separate slots for namespace and name, as you have above. So I think the discussion boils down to whether a namespace specifier is logically a string or an array of strings.


Short version: I was originally going to argue for fully hierarchical namespaces, identified as above, but after turning this over in my head for a while, I came to the conclusion that namespaces are not conceptually hierarchical (especially as used in languages such as Perl5 and Java, at least), so I'm going to argue for a single string (rather than an array) as a namespace identifier.

Here's my big, and in fact *only*, reason to go hierarchical:


We don't need to mess around with separator character substitution.

Other than that I don't much care and, as you've pointed out, most of the languages don't really do a hierarchical structure as such. Going hierarchical, though, means we don't have to do "::"/":"/"/"/whatever substitutions to present a unified view of the global namespaces.

I'm thinking really hard about this at the moment, so this'd be a good time to reconsider considering the problem. (And thanks much to Jeff, whose message I've tacked this onto, for the set 'o things to ponder)
--
Dan


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

Reply via email to