Skip to content

Commit 053715b

Browse files
committed
Rephrasing slightly
1 parent cb7af52 commit 053715b

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

doc/Language/objects.pod6

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Although Perl 6 allows programmers to program in multiple paradigms,
99
Object Oriented Programming is at the heart of the language.
1010
1111
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>.
1313
Everything that you can store in a variable is either a I<native value>
1414
or an I<object>. That includes literals, types (type objects), code and
1515
containers.
@@ -19,7 +19,8 @@ types do not have the same capabilities as objects, if you call methods on them,
1919
they are automatically I<boxed> into normal objects.
2020
2121
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
2324
L<encapsulation|https://en.wikipedia.org/wiki/Object-oriented_programming#Encapsulation>.
2425
2526
@@ -687,14 +688,14 @@ attributes can be supplied as named arguments.
687688
See document for L<clone|/routine/clone> for details on how non-scalar attributes get cloned,
688689
as well as examples of implementing your own custom clone methods.
689690
690-
=head1 X<Roles|declarator,role>
691+
=head1 The X<role> declarator
691692
X<|does>
692693
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.
698699
699700
=begin code
700701
use MONKEY-SEE-NO-EVAL;

0 commit comments

Comments
 (0)