develooper Front page | perl.perl6.language | Postings from October 2006

Re: RFC: multi assertions/prototypes: a step toward programming bycontract

Thread Previous | Thread Next
From:
TSa
Date:
October 5, 2006 09:00
Subject:
Re: RFC: multi assertions/prototypes: a step toward programming bycontract
Message ID:
45252BF4.80003@barco.com
HaloO,

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

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?


Regards,
-- 

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About