@@ -38,13 +38,13 @@ Here C<f()> is a sub with one parameter, and since it has no explicit
38
38
type, it is implicitly typed as C < Any > . The C < Junction > argument causes
39
39
the C < f(1|2|3) > call to be internally executed as C < f(1)|f(2)|f(3) > ,
40
40
and the resulting junction is C < 2|4|6 > . This process of separating
41
- Junction arguments into multiple calls to a function is called
41
+ junction arguments into multiple calls to a function is called
42
42
I < autothreading > .
43
43
44
44
= head1 Instance
45
45
46
46
An I < instance > of a class is also called an I < object > in some other
47
- programming languages. It has a storage for attributes, and is often
47
+ programming languages. It has storage for attributes and is often
48
48
the return value of a call to a method called C < new > , or a literal.
49
49
50
50
Instances of most types are defined to be C < True >
@@ -65,29 +65,28 @@ e.g., C<defined($instance)> is C<True>.
65
65
my $an_instance = A.new;
66
66
say $an_instance.defined.perl;# defined($an_instance) works too.
67
67
68
- Or to put it another way, a class has all the blueprint of methods and
69
- attributes, and an instance carries it forward into the real world.
68
+ To put things another way, a class contains the blueprints of methods and
69
+ attributes, and an instance carries it into the real world.
70
70
71
71
= head1 Invocant
72
72
73
- The object on which a method is called is called the I < invocant > in Perl 6.
73
+ The object upon which a method is called, is referred to as the I < invocant > in Perl 6.
74
74
It is what C < self > refers to in a method.
75
75
76
76
say 'str'.uc; # 'str' is the invocant of method uc
77
77
78
78
= head1 Literal
79
79
80
- A I < literal > is a piece of code that directly stands for a (often
81
- built-in) object, and also refers to the object itself.
80
+ A I < literal > is a piece of code that directly stands for an (often
81
+ built-in) object and also refers to the object itself.
82
82
83
83
my $x = 2; # the 2 is a literal
84
84
say $x; # $x is not a literal, but a variable
85
85
86
-
87
86
= head1 lvalue
88
87
89
- An I < lvalue > or a I < left value > is anything that can appear on the left
90
- hand side of the assignment operator C < = > ; anything you can assign
88
+ An I < lvalue > , or a I < left value > , is anything that can appear on the left
89
+ hand side of the assignment operator C < = > . It is anything you can assign
91
90
to.
92
91
93
92
Typical lvalues are variables, private and C < is rw > attributes, lists
@@ -103,7 +102,7 @@ Examples of lvalues:
103
102
has $.attrib is rw; $.attrib
104
103
sub a is rw { $x }; a()
105
104
106
- Examples of things that are not lvalues
105
+ Examples of things that are not lvalues:
107
106
108
107
3 # literals
109
108
constant x = 3; # constants
0 commit comments