@@ -9,7 +9,7 @@ Although Perl 6 allows programmers to program in multiple paradigms,
9
9
Object Oriented Programming is at the heart of the language.
10
10
11
11
Perl 6 comes with a wealth of predefined types, which can be classified
12
- in two categories: normal and L < I < native > types|/language/nativetypes> .
12
+ in two categories: regular and L < I < native > types|/language/nativetypes> .
13
13
Everything that you can store in a variable is either a I < native value >
14
14
or an I < object > . That includes literals, types (type objects), code and
15
15
containers.
@@ -19,7 +19,8 @@ types do not have the same capabilities as objects, if you call methods on them,
19
19
they are automatically I < boxed > into normal objects.
20
20
21
21
Everything that is not a I < native > value is an I < object > .
22
- Objects do allow for both L < inheritance|https://en.wikipedia.org/wiki/Object-oriented_programming#Inheritance_and_behavioral_subtyping > and
22
+ Objects do allow for both
23
+ L < inheritance|https://en.wikipedia.org/wiki/Object-oriented_programming#Inheritance_and_behavioral_subtyping > and
23
24
L < encapsulation|https://en.wikipedia.org/wiki/Object-oriented_programming#Encapsulation > .
24
25
25
26
@@ -687,14 +688,14 @@ attributes can be supplied as named arguments.
687
688
See document for L < clone|/routine/clone > for details on how non-scalar attributes get cloned,
688
689
as well as examples of implementing your own custom clone methods.
689
690
690
- = head1 X < Roles|declarator, role>
691
+ = head1 The X < role > declarator
691
692
X < |does >
692
693
693
- Roles are in some ways similar to classes, in that they are a collection of
694
- attributes and methods. They differ in that roles are also meant for
695
- describing only parts of an object's behavior and in how roles are applied
696
- to classes. Or to phrase it differently, classes are meant for managing
697
- objects and roles are meant for managing behavior and code reuse.
694
+ Roles are a collection of attributes and methods; however, unlike classes, roles
695
+ are meant for describing only parts of an object's behavior; this why, in
696
+ general, roles are intended to be I < mixed in > classes and objects. In general,
697
+ classes are meant for managing objects and roles are meant for managing behavior
698
+ and code reuse within objects .
698
699
699
700
= begin code
700
701
use MONKEY-SEE-NO-EVAL;
0 commit comments