state ($a, $b) = foo();
-In Perl 6, C<state ($a) = foo();> and C<(state $a) = foo();> have different
+In Raku, C<state ($a) = foo();> and C<(state $a) = foo();> have different
semantics, which is tricky to implement in Perl 5 as currently they produce
-the same opcode trees. The Perl 6 design is firm, so it would be good to
+the same opcode trees. The Raku design is firm, so it would be good to
implement the necessary code in Perl 5. There are comments in
C<Perl_newASSIGNOP()> that show the code paths taken by various assignment
constructions involving state variables.
the language Dylan (see links in the L</"SEE ALSO"> section), and then
later adopted as the preferred MRO (Method Resolution Order) for the
new-style classes in Python 2.3. Most recently it has been adopted as the
-"canonical" MRO for Perl 6 classes, and the default MRO for Parrot objects
+"canonical" MRO for Raku classes, and the default MRO for Parrot objects
as well.
=head2 How does C3 work
=head2 The 'say' feature
-C<use feature 'say'> tells the compiler to enable the Perl 6 style
+C<use feature 'say'> tells the compiler to enable the Raku style
C<say> function.
See L<perlfunc/say> for details.
no warnings "experimental::smartmatch";
-C<use feature 'switch'> tells the compiler to enable the Perl 6
+C<use feature 'switch'> tells the compiler to enable the Raku
given/when construct.
See L<perlsyn/"Switch Statements"> for details.
A special thanks to Damian Conway, who didn't only suggest important changes,
but also took the time to count the number of listed features and make a
-Perl 6 version to show that Perl will stay Perl.
+Raku version to show that Perl will stay Perl.
=head1 AUTHOR
=item *
-L<https://perlmonks.org/?node_id=238031> - Damian Conway's Perl 6 version
+L<https://perlmonks.org/?node_id=238031> - Damian Conway's Raku version
=item *
found at L<irc://irc.perl.org/#perl>. Many other more specific chats are also
hosted on the network. Information about irc.perl.org is located on the
network's website: L<https://www.irc.perl.org>. For a more help-oriented #perl,
-check out L<irc://irc.freenode.net/#perl>. Perl 6 development also has a
-presence in L<irc://irc.freenode.net/#perl6>. Most Perl-related channels will
-be kind enough to point you in the right direction if you ask nicely.
+check out L<irc://irc.freenode.net/#perl>. Raku development also has a
+presence in L<irc://irc.freenode.net/#raku-dev>. Most Perl-related channels
+will be kind enough to point you in the right direction if you ask nicely.
Any large IRC network (Dalnet, EFnet) is also likely to have a #perl channel,
with varying activity levels.
The aim of the implementation is to provide the PerlIO API in a flexible
and platform neutral manner. It is also a trial of an "Object Oriented
-C, with vtables" approach which may be applied to Perl 6.
+C, with vtables" approach which may be applied to Raku.
=head2 Basic Structure
C<Moose> provides a complete, modern OO system. Its biggest influence
is the Common Lisp Object System, but it also borrows ideas from
Smalltalk and several other languages. C<Moose> was created by Stevan
-Little, and draws heavily from his work on the Perl 6 OO design.
+Little, and draws heavily from his work on the Raku OO design.
Here is our C<File> class using C<Moose>:
Over this group of porters presides Larry Wall. He has the final word
in what does and does not change in any of the Perl programming languages.
-These days, Larry spends most of his time on Perl 6, while Perl 5 is
+These days, Larry spends most of his time on Raku, while Perl 5 is
shepherded by a "pumpking", a porter responsible for deciding what
goes into each release and ensuring that releases happen on a regular
basis.
=item C<(*THEN)> C<(*THEN:I<NAME>)>
-This is similar to the "cut group" operator C<::> from Perl 6. Like
+This is similar to the "cut group" operator C<::> from Raku. Like
C<(*PRUNE)>, this verb always matches, and when backtracked into on
failure, it causes the regex engine to try the next alternation in the
innermost enclosing group (capturing or otherwise) that has alternations.
=item C<(*COMMIT)> C<(*COMMIT:I<arg>)>
X<(*COMMIT)>
-This is the Perl 6 "commit pattern" C<< <commit> >> or C<:::>. It's a
+This is the Raku "commit pattern" C<< <commit> >> or C<:::>. It's a
zero-width pattern similar to C<(*SKIP)>, except that when backtracked
into on failure it causes the match to fail outright. No further attempts
to find a valid match by advancing the start pointer will occur again.
use feature "switch";
to enable an experimental switch feature. This is loosely based on an
-old version of a Perl 6 proposal, but it no longer resembles the Perl 6
+old version of a Raku proposal, but it no longer resembles the Raku
construct. You also get the switch feature whenever you declare that your
code prefers to run under a version of Perl that is 5.10 or later. For
example:
and 5.16, under those implementations the version of C<$_> governed by
C<given> is merely a lexically scoped copy of the original, not a
dynamically scoped alias to the original, as it would be if it were a
-C<foreach> or under both the original and the current Perl 6 language
+C<foreach> or under both the original and the current Raku language
specification. This bug was fixed in Perl 5.18 (and lexicalized C<$_> itself
was removed in Perl 5.24).
This doesn't work if you explicitly specify a loop variable, as
in C<for $item (@array)>. You have to use the default variable C<$_>.
-=head3 Differences from Perl 6
+=head3 Differences from Raku
The Perl 5 smartmatch and C<given>/C<when> constructs are not compatible
-with their Perl 6 analogues. The most visible difference and least
+with their Raku analogues. The most visible difference and least
important difference is that, in Perl 5, parentheses are required around
the argument to C<given()> and C<when()> (except when this last one is used
-as a statement modifier). Parentheses in Perl 6 are always optional in a
+as a statement modifier). Parentheses in Raku are always optional in a
control construct such as C<if()>, C<while()>, or C<when()>; they can't be
made optional in Perl 5 without a great deal of potential confusion,
because Perl 5 would parse the expression
say "that's all, folks!";
-But it doesn't work at all in Perl 6. Instead, you should
+But it doesn't work at all in Raku. Instead, you should
use the (parallelizable) C<any> operator:
if any(@primary) eq "red" {
}
The table of smartmatches in L<perlop/"Smartmatch Operator"> is not
-identical to that proposed by the Perl 6 specification, mainly due to
-differences between Perl 6's and Perl 5's data models, but also because
-the Perl 6 spec has changed since Perl 5 rushed into early adoption.
+identical to that proposed by the Raku specification, mainly due to
+differences between Raku's and Perl 5's data models, but also because
+the Raku spec has changed since Perl 5 rushed into early adoption.
-In Perl 6, C<when()> will always do an implicit smartmatch with its
+In Raku, C<when()> will always do an implicit smartmatch with its
argument, while in Perl 5 it is convenient (albeit potentially confusing) to
suppress this implicit smartmatch in various rather loosely-defined
situations, as roughly outlined above. (The difference is largely because
/* For left shifts, perl 5 has chosen to treat the value as unsigned for
* the * purposes of shifting, then cast back to signed. This is very
- * different from perl 6:
+ * different from Raku:
*
- * $ perl6 -e 'say -2 +< 5'
+ * $ raku -e 'say -2 +< 5'
* -64
*
* $ ./perl -le 'print -2 << 5'
=head2 The 'say' feature
-C<use feature 'say'> tells the compiler to enable the Perl 6 style
+C<use feature 'say'> tells the compiler to enable the Raku style
C<say> function.
See L<perlfunc/say> for details.
no warnings "experimental::smartmatch";
-C<use feature 'switch'> tells the compiler to enable the Perl 6
+C<use feature 'switch'> tells the compiler to enable the Raku
given/when construct.
See L<perlsyn/"Switch Statements"> for details.