Larry Wall wrote:
Basically, all types do Package whenever they need an associated

Great! This is how I imagined things to be. And the reason why
the :: sigil is also the separator of namespaces.

 And most of the Package role is simply:

    method postfix:<::> () { return %.HOW.packagehash }

or some such, so "$type.::" returns the symbol table hash associated
with the type, if any.  It's mostly just a convention that the Foo
prototype and the Foo:: package are considered interchangable for
most purposes.

Do these namespaces also give a structural type definition in the
sense of record subtyping? That is a package is a subtype of another
package if the set of labels is a superset and the types of the slots
available through the common labels are in a subtype relation?


Reply via email to