On September 7, 2004 09:15 am, Leopold Toetsch wrote:
> Dan Sugalski <[EMAIL PROTECTED]> wrote:
> > *) Namespaces are hierarchical
>
> What do we do against collisions? During Pie-thon hacking I came along
> this problem:
>
>  class C():
>      pass
>
>  c = C()
>
> "C" ought to be now a "global" classname (that's what the bytecode
> indicates) and it should be its own namespace for holding class methods.
>
> But the hash slot at "C" can only be used once.
>
> Or similiar:
>
>   .namespace ["foo" ; "bar" ]
>
> prohibits any "foo" global in the top-level namespace.
>
> leo

While thinking about this very thing for a VM I was/am working on, a class isa 
namespace. And really, I'd probably start by implementing namespaces as a 
simple Hash. so, class isa namespace isa hash isa type. (type is my pmc like 
thing, I can't believe I thought about my "type" stuff before I started 
reading this list :o)

How well this will actually work for me or Parrot? I've no idea.

-- 
Thomas Fjellstrom
[EMAIL PROTECTED]
http://strangesoft.net

Reply via email to