HaloO,

Trey Harris wrote:
I would hate for Perl 6 to start using C<Any> or C<Whatever> in the
sort of ways that many languages abuse "Object" to get around the restrictions of their type systems. I think that, as a rule, any prototype encompassing all variants of a multi should not only
specify types big enough to include all possible arguments, but also
specify types small enough to exclude impossible arguments.

As Miroslav proposed to handle the specification of the interface with
role composition we get another thing as well: implicit type parameter
expansion. That is, a role can be defined in terms of the self type and
e.g. use that as parameter type, return type and type constraints. All
of which nicely expand to the module or package type the role is
composed into!


Regards, TSa.
--

Reply via email to