On Mar 8, 2006, at 14:30, Leopold Toetsch wrote:

2)
       Default Namespace

The default namespace PMC will implement Parrot's current behavior.

The current implementation allows a nested namespace and a variable to have the same name (via the hack of prepending "\0" to namespace names). Assuming that this hack should go away, I see two ways to continue implementation:

a) Parrot's default namespace is untyped (raw). This means that a variable/subroutine can't have the same name as a namespace. This could break existing code.

b) Otherwise, Parrot's namespace is (half-)typed, at least namespace and variable/sub are allowed to coexist with the same name. [1]

I've implemented now b). The overhead is low (one if statement) and no additional storage space is used, if either a NameSpace or a var_or_sub is stored into a name slot.

leo

Reply via email to