Perl 6 Programming/Roles and Inheritance

InheritanceEdit

Basic class systems enable data and the code routines that operate on that data to be bundled together in a logical way. However, there are more advanced features of most class systems that enable inheritance too, which allows classes to build upon one another. Inheritance is the ability for classes to form logical hierarchies. Perl 6 supports normal inheritance of classes and subclasses, but also supports special advanced features called mixins, and roles. We are going to have to reserve some of the more difficult of these features for later chapters, but we will introduce them here.

Class InheritanceEdit

Roles and doesEdit

MixinsEdit

Parametric RolesEdit

Last modified on 18 February 2009, at 15:10