Larry,

On Sep 7, 2005, at 12:45 PM, Larry Wall wrote:
: >All sigils and twigils are part of the key to the symbol table, so it's
: >now just
: >
: >    Foo<$.baz>
:
: What would Foo<$.baz> return though (assuming Foo is a class)? It
: cannot return a value since it is an instance specific value.

Foo<@baz> is not a value either, but a container.  I would say that
Foo<$.baz> returns a generic container that happens not to work
without an extra instance argument to say which chunk of data to map
the container metainfo onto.

: Should it return some kind of meta-object?

Yes.

If methods and subs are in the same namespace, and both have the & sigil, what about instance attributes and class attributes? Is this legal?

class Foo {
        my $.bar;
        has $.bar;
}

Part of me thinks that it should be since my $.bar is an attribute of the Foo class, and has $.bar is an attribute of instances of Foo.

Also, is there anyway to iterate over the keys in the namespace? The old way would be to do something like keys(%Foo::). Is something like this possible with the new way?

Thanks,

Stevan

Reply via email to