Skip to content

Commit

Permalink
Clarify appearances of 'fat comma' refs #2520
Browse files Browse the repository at this point in the history
  • Loading branch information
JJ committed Dec 30, 2018
1 parent f13eb68 commit 6aa90da
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions doc/Language/5to6-nutshell.pod6
Expand Up @@ -620,8 +620,8 @@ a sub that expects a hashref, then the usage is likely identical.
If you were using C«=>» as a convenient shortcut to not have to quote part
of a list, or in passing arguments to a sub that expects a flat list of
KEY, VALUE, KEY, VALUE, then continuing to use C«=>» may break your code.
The easiest workaround is to change the fat comma to a regular comma, and
C<KEY, VALUE, KEY, VALUE>, then continuing to use C«=>» may break your code.
The easiest workaround is to change that I<fat arrow> to a regular comma, and
manually add quotes to its left-hand side. Or, you can change the sub's API
to L<slurp a hash|/type/Signature#Slurpy_(A.K.A._variadic)_parameters>.
A better long-term solution is to change the sub's API to
Expand Down
10 changes: 5 additions & 5 deletions doc/Language/5to6-perlop.pod6
Expand Up @@ -243,11 +243,11 @@ creates L<Lists|/type/List>) or separates arguments in function
calls. Also, there is a C<:> variant that turns function calls into
method calls - see L<this page|/language/operators#infix_%3A>.
The C<< => >> operator works similarly to the Perl 5 "fat comma"
behavior in that it allows an unquoted identifier on its left side,
but in Perl 6 constructs Pair objects, rather than just functioning as
a separator. If you are trying to just literally translate a line of
Perl 5 code to Perl 6, it should behave as expected.
The C<< => >> operator, or I<fat arrow>, works similarly to the Perl 5 "fat
comma" in that it allows an unquoted (ordinary) identifier on its left side, but
in Perl 6 constructs Pair objects, rather than just functioning as a separator.
If you are trying to just literally translate a line of Perl 5 code to Perl 6,
it should behave as expected.
=head2 List operators (rightward)
Expand Down

0 comments on commit 6aa90da

Please sign in to comment.