Skip to content

Commit

Permalink
Changes phrasing for description of binding
Browse files Browse the repository at this point in the history
It limits itself to the problem pointed out in the OP, so this should
close #1378.

The terminology suggested by @smls is great, but it might be better to
open some issues to pages where it's not well expressed.
  • Loading branch information
JJ committed May 21, 2018
1 parent 343c127 commit 8d11b5f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions doc/Language/list.pod6
Expand Up @@ -85,17 +85,19 @@ also contain these objects, but C<@>-sigiled variables always do, and
are expected to act the part.
By default, when you assign a C<List> to an C<@>-sigiled variable, you create
an C<Array>. Those are described below. If, instead you want to put an actual
C<List> into an C<@>-sigiled variable, you can use binding with C<:=> instead.
an C<Array>. Those are described below. If instead you want to refer directly to a
C<List> object using an C<@>-sigiled variable, you can use binding with C<:=> instead.
my @a := 1, 2, 3;
One of the ways C<@>-sigiled variables act like lists is by always supporting
L<positional subscripting|/language/subscripts>. Anything bound to a C<@>-sigiled
value must support the L<Positional|/type/Positional> role which guarantees this:
value must support the L<Positional|/type/Positional> role which guarantees that this is going to fail:
my @a := 1; # Type check failed in binding; expected Positional but got Int
=head1 Reset a List Container
To remove all elements from a Positional container assign
Expand Down

0 comments on commit 8d11b5f

Please sign in to comment.