Okay, this is going to be a three parter. The second part is entirely structural, and mostly a matter of convention. (It's second because the sensible thing to do is go over the link Tim posted to the previous discussion and more or less Make It So. I'm having a hard time getting a solid chunk of time together to do so, so it's second) The third part's the updated ops and implementation details, which need

But the first part, in PHB-style bullet points:

*) Our namespaces are going to be hierarchic.

*) There are three things that can be in a namespace: Another namespace, a method or sub, and a variable.

*) The names of namespaces, methods & subs, and variables do *not* collide. You may have a namespace Foo, a sub Foo, and a variable Foo at the same level of a namespace.

*) Sub and method names *will* collide, so be careful there.

*) If a language wants different types of variables to have the same name, it has to mangle the names. (So you can't have an Array, a String, and an Integer all named Foo) The only language I know of that does this is Perl, and we just need to include the sigil as part of the name and we're fine there.

*) Namespaces and namespace hierarchies may be overlaid. That means we look in the first hierarchy for something and, if we don't find it we look in the next, and so on. There will normally be a single namespace in force, but there may sometimes be multiple levels. (It allows for lexically scoped overridden namespaces and suchlike things, which are useful)

*) No, you *can't* override individual slots on a namespace. You can, however, tie a namespace.

*) Namespaces, by default, support notifications.


I think that's it for the basic semantics. Discuss, if you will, for now. I'll get to work on part two.
--
Dan


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

Reply via email to