This is an old message I'm replying to, so I'll copy most of it.

On Fri, Mar 10, 2006 at 07:05:34PM +0100, Leopold Toetsch wrote:
>    Code snippet                   # NameSpace::name
> 
>   .sub main                       # ''   actually  parrot      [1]
>      store_global 'x', $P0        #                parrot::x
>      cl = newclass 'Foo'          #                parrot::Foo
>   .end
> 
>    .namespace ['Foo']             # 'Foo' but really parrot::Foo
> 
>   .sub foo :method                # Foo::foo  actually   parrot::Foo::foo
>      store_global 'x', $P0        # Foo::x       ...     parrot::Foo::x
>      cl = newclass 'Bar'          # Foo::Bar     ... i.e. create nested name
>   .end
> 
>    .namespace ['Foo'; 'Bar']      # parrot::Foo::Bar
>    ...
> 
>    .HLL "perl5","                 # new top-level namespace
>     .sub 'x'                      # perl5::x
>    ...
>
> [1] implicit HLL := 0, aka 'parrot' [2] default namespace
> [2] the name might change still

I still don't like "parrot" as the default namespace, but I dislike it a lot
less than when you first suggested it.  So no change for now.  :-,

> The default HLL namespace is the pseudo-root namespace for all namespace
> operations except 'get_namespace' and 'add_namespace', which work from the
> actual namespace root.

Change needed: All namespace opcodes should be HLL-root-relative, without
exception.  I never meant otherwise, but I didn't document it right in a
couple cases.  Should be OK now.  

> The biggest change to the current implementqtion will be, that 
> 'store_global' and 'find_global' will work relative to the *current* 
> namespace and not to namespace-root like now.

Right.
-- 
Chip Salzenberg <[EMAIL PROTECTED]>

Reply via email to