roles
.
Perl 6, are we theeere yet...?
We use classes as "types", but also to add functionality to existing classes unsing multiple inheritance. Perl 6 supports a cleaner way to do multiple inheritance, allows us to insert a framgment of a class into another classes code.
class Vector::Identifiable {
is Vector;
does Identifiable;
...
}
So the compiler effectively takes the contents of the fragment of the class and unifies the builds. This should lead to a more unified design (component libraries). Roles are not classes, they are just fragments. However, if you declare methods without defining them, you basically have a Java interface. Roles are therefore a superset of traits.