from the recent threads 'class interface of roles',
'set operations for roles' and 'signature subtyping
and role merging' I wonder how typish roles actually
are. Some seem to consider roles as lightweight
particles that serve to compose classes. I see them
as the heavyweights in the type department. Doing a
role is like a contract about certain functionality.
So, what does @Larry think?

I know that S12 states "The type system of Perl
consists of roles, classes, and subtypes" but I don't
have a clear picture of the inner workings or the
formal model of this type system. E.g. what actually
constitutes a type? How are the classes related to
types? There is this fuzzy concept that a class is
also a role of the same name as far as typing is
concerned. How is the subtyping relation defined?

Regards, TSa.

Reply via email to