On Thu, 4 Sep 2003, Leopold Toetsch wrote:

> Dan Sugalski <[EMAIL PROTECTED]> wrote:
> 
> > Anyway, for a perl/python/ruby object of class Foo, to add a new method
> > you'd just add a new sub/method name/PMC binding to the Foo namespace.
> 
> Can I translate that to: "some_method" in class "Foo" has a Sub PMC in
> the global stash, i.e. is retrievable by:
> 
>   .local Sub meth
>   meth = global "&Foo::some_method" # perlish mangling
> 
> or, how else would that look like in PASM?

Pretty much like that. Pure pasm'd do a store_global into the right stash, 
but not much past that.

> BTW what is the linked list in the global stash for?

Python. It's got nested global namespaces--what's supposed to happen is 
that when you do a lookup, if it fails you walk up the chain looking for 
the symbol until you find it or run out of chain. That way you can have 
local overrides of global namespaces.

It's... an interesting way to do things, but it does it, so there's 
support in for it.

                                        Dan

Reply via email to