Neat work, Leo! Couple of comments & requests: On Wed, Mar 15, 2006 at 08:14:20AM -0800, [EMAIL PROTECTED] wrote: > - initial/default HLL namespace is "parrot"
I didn't ask for a default, and I don't think there should be one, but I'm interested in your reason for adding one. Rationale: the system as a whole *is* Parrot. Looking at Parrot in context of a running computer system, there is a notional (not actual) "parrot::" before *Everything* in a running parrot system. Adding an explicit "parrot::" seems to me like adding an explicit "perl::" to the beginning of every Perl package name. > - store_global, find_global w/o namespace are now relative to > current namespace Excellent. > - intermediate workaround for 'newclass / .namespace': try current and HLL > namespace to find class namespace Good workaround, thanks. > - getnamespace is absolute to namespace root I don't think that's a good idea. Once we start making exceptions to the relativity rule, users will have to memorize those exceptions, and then some opcodes will become less useful. By my intention, the only way to get to the namespace root should be via introspection (interpinfo). On the other hand, I think we should consider get_namespace and find_global opcodes that accept a namespace PMC as the "root" for the search. Linux just added a whole raft of analogous system calls. For example, in recent Linux you can open /etc/motd in two ways, either: int fd = open("/etc/motd", O_RDONLY); or: int etc_fd = open("/etc", O_RDONLY | O_DIRECTORY) int fd = openat(etc_fd, "motd", O_RDONLY); I think Parrot opcodes like "get_namespace_at" or "find_global_at" (not necessarily with those names), modeled on the Linux openat() family, will address the usability problem that you seem to be addressing with your getnamespace root exception, while also being useful in other circumstances. -- Chip Salzenberg <[EMAIL PROTECTED]>