Skip to content

Commit ffeddb1

Browse files
committed
Rewrites sentence on sigilless variable
Thanks to @jimav for the suggestion. Also rewrites some other things here and there. Refs #1784.
1 parent 43cab13 commit ffeddb1

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

doc/Language/containers.pod6

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,8 @@ You've seen this situation before: it is exactly what happened with the
149149
signature parameter marked as C<is rw>.
150150
151151
X<|\ (container binding)>
152-
Sigilless variables bind by default and so do parameters with the trait C<is raw>.
152+
Sigilless variables and parameters with the trait C<is raw> always
153+
bind (whether C<=> or C<:=> is used):
153154
154155
my $a = 42;
155156
my \b = $a;
@@ -163,8 +164,8 @@ Sigilless variables bind by default and so do parameters with the trait C<is raw
163164
=head1 Scalar containers and listy things
164165
165166
There are a number of positional container types with slightly different
166-
semantics in Perl 6. The most basic one is L<List|/type/List>
167-
It is created by the comma operator.
167+
semantics in Perl 6. The most basic one is L<List|/type/List>;
168+
it is created by the comma operator.
168169
169170
say (1, 2, 3).^name; # OUTPUT: «List␤»
170171
@@ -182,7 +183,7 @@ you can still assign to it:
182183
So the list doesn't care about whether its elements are values or
183184
containers, they just store and retrieve whatever was given to them.
184185
185-
Lists can also be lazy, so elements at the end are generated on demand from an
186+
Lists can also be lazy; in that case, elements at the end are generated on demand from an
186187
iterator.
187188
188189
An C<Array> is just like a list, except that it forces all its elements to
@@ -198,7 +199,7 @@ container with the new one, C<42>.
198199
199200
=head1 Assigning and binding to array variables
200201
201-
Assigning to a scalar variable and to an array variable both do basically
202+
Assignment to a scalar variable and to an array variable both do
202203
the same thing: discard the old value(s), and enter some new value(s).
203204
204205
Nevertheless, it's easy to observe how different they are:
@@ -227,8 +228,8 @@ As a curious side note, Perl 6 supports binding to array elements:
227228
If you've read and understood the previous explanations, it is now time to
228229
wonder how this can possibly work. After all, binding to a variable requires
229230
a lexpad entry for that variable, and while there is one for an array, there
230-
aren't lexpad entries for each array element (you cannot expand the lexpad
231-
at run time).
231+
aren't lexpad entries for each array element, because you cannot expand the lexpad
232+
at run time.
232233
233234
The answer is that binding to array elements is recognized at the syntax
234235
level and instead of emitting code for a normal binding operation, a special

0 commit comments

Comments
 (0)