<s>
Raku	B-Application
is	O
a	O
member	O
of	O
the	O
Perl	B-Language
family	O
of	O
programming	O
languages	O
.	O
</s>
<s>
Formerly	O
known	O
as	O
Perl	B-Application
6	I-Application
,	O
it	O
was	O
renamed	O
in	O
October	O
2019	O
.	O
</s>
<s>
Raku	B-Application
introduces	O
elements	O
of	O
many	O
modern	O
and	O
historical	O
languages	O
.	O
</s>
<s>
Compatibility	O
with	O
Perl	B-Language
was	O
not	O
a	O
goal	O
,	O
though	O
a	O
compatibility	B-Application
mode	I-Application
is	O
part	O
of	O
the	O
specification	O
.	O
</s>
<s>
The	O
design	O
process	O
for	O
Raku	B-Application
began	O
in	O
2000	O
.	O
</s>
<s>
The	O
Raku	B-Application
design	O
process	O
was	O
first	O
announced	O
on	O
19	O
July	O
2000	O
,	O
on	O
the	O
fourth	O
day	O
of	O
that	O
year	O
's	O
Perl	B-Language
Conference	O
,	O
by	O
Larry	O
Wall	O
in	O
his	O
State	O
of	O
the	O
Onion	O
2000	O
talk	O
.	O
</s>
<s>
At	O
that	O
time	O
,	O
the	O
primary	O
goals	O
were	O
to	O
remove	O
"	O
historical	O
warts	O
"	O
from	O
the	O
language	O
;	O
"	O
easy	O
things	O
should	O
stay	O
easy	O
,	O
hard	O
things	O
should	O
get	O
easier	O
,	O
and	O
impossible	O
things	O
should	O
get	O
hard	O
"	O
;	O
a	O
general	O
cleanup	O
of	O
the	O
internal	O
design	O
and	O
APIs	B-Application
.	O
</s>
<s>
While	O
the	O
original	O
goal	O
was	O
to	O
write	O
one	O
Apocalypse	O
for	O
each	O
chapter	O
of	O
Programming	O
Perl	B-Language
,	O
it	O
became	O
obvious	O
that	O
,	O
as	O
each	O
Apocalypse	O
was	O
written	O
,	O
previous	O
Apocalypses	O
were	O
being	O
invalidated	O
by	O
later	O
changes	O
.	O
</s>
<s>
Today	O
,	O
the	O
Raku	B-Application
specification	O
is	O
managed	O
through	O
the	O
"	O
roast	O
"	O
testing	O
suite	O
,	O
while	O
the	O
Synopses	O
are	O
kept	O
as	O
a	O
historical	O
reference	O
.	O
</s>
<s>
There	O
are	O
three	O
primary	O
methods	O
of	O
communication	O
used	O
in	O
the	O
development	O
of	O
Raku	B-Application
today	O
.	O
</s>
<s>
The	O
first	O
is	O
the	O
raku	B-Application
IRC	B-Protocol
channel	I-Protocol
on	O
Libera	O
Chat	O
.	O
</s>
<s>
The	O
third	O
is	O
the	O
Git	B-Application
source	B-General_Concept
code	I-General_Concept
repository	I-General_Concept
hosted	O
at	O
GitHub	B-Application
.	O
</s>
<s>
These	O
included	O
the	O
confusion	O
surrounding	O
sigil	O
usage	O
for	O
containers	O
,	O
the	O
ambiguity	O
between	O
the	O
select	O
functions	O
,	O
and	O
the	O
syntactic	O
impact	O
of	O
bareword	O
filehandles	B-Application
.	O
</s>
<s>
There	O
were	O
many	O
other	O
problems	O
that	O
Perl	B-Language
programmers	O
had	O
discussed	O
fixing	O
for	O
years	O
that	O
were	O
explicitly	O
addressed	O
by	O
Wall	O
in	O
his	O
speech	O
.	O
</s>
<s>
An	O
implication	O
of	O
these	O
goals	O
was	O
that	O
Perl	B-Application
6	I-Application
would	O
not	O
have	O
backward	B-General_Concept
compatibility	I-General_Concept
with	O
the	O
existing	O
Perl	B-Language
codebase	O
.	O
</s>
<s>
This	O
meant	O
that	O
some	O
code	O
which	O
was	O
correctly	O
interpreted	O
by	O
a	O
Perl	B-Language
5	O
compiler	O
would	O
not	O
be	O
accepted	O
by	O
a	O
Perl	B-Application
6	I-Application
compiler	O
.	O
</s>
<s>
Since	O
backward	B-General_Concept
compatibility	I-General_Concept
is	O
a	O
common	O
goal	O
when	O
enhancing	O
software	O
,	O
the	O
breaking	B-General_Concept
changes	I-General_Concept
in	O
Perl	B-Application
6	I-Application
had	O
to	O
be	O
stated	O
explicitly	O
.	O
</s>
<s>
The	O
distinction	O
between	O
Perl	B-Language
5	O
and	O
Perl	B-Application
6	I-Application
became	O
so	O
large	O
that	O
eventually	O
Perl	B-Application
6	I-Application
was	O
renamed	O
Raku	B-Application
.	O
</s>
<s>
The	O
language	O
's	O
mascot	B-Application
is	O
"	O
Camelia	O
,	O
the	O
Raku	B-Application
bug	B-Error_Name
"	O
.	O
</s>
<s>
Her	O
name	O
is	O
a	O
nod	O
to	O
the	O
camel	O
mascot	B-Application
associated	O
with	O
Perl	B-Language
,	O
and	O
her	O
form	O
,	O
in	O
the	O
pun-loving	O
tradition	O
of	O
the	O
Perl	B-Language
community	O
,	O
is	O
a	O
play	O
on	O
"	O
software	B-Error_Name
bug	I-Error_Name
"	O
.	O
</s>
<s>
Spiral	O
designs	O
embedded	O
in	O
her	O
butterfly-like	O
wings	O
resemble	O
the	O
characters	O
"	O
P6	O
"	O
,	O
the	O
favored	O
nickname	O
for	O
Perl	B-Application
6	I-Application
,	O
and	O
off-center	O
eye	O
placement	O
is	O
an	O
intentional	O
pun	O
on	O
"	O
Wall-eyed	O
"	O
.	O
</s>
<s>
,	O
only	O
the	O
Rakudo	B-Language
implementation	O
is	O
under	O
active	O
development	O
.	O
</s>
<s>
No	O
implementation	O
will	O
be	O
designated	O
as	O
the	O
official	O
Raku	B-Application
implementation	O
;	O
rather	O
,	O
"	O
Raku	B-Application
is	O
anything	O
that	O
passes	O
the	O
official	O
test	O
suite.	O
"	O
</s>
<s>
Rakudo	B-Language
Perl	I-Language
6	I-Language
targets	O
a	O
number	O
of	O
virtual	B-Architecture
machines	I-Architecture
,	O
such	O
as	O
MoarVM	B-Language
,	O
the	O
Java	B-Language
Virtual	I-Language
Machine	I-Language
,	O
and	O
JavaScript	B-Language
.	O
</s>
<s>
MoarVM	B-Language
is	O
a	O
virtual	B-Architecture
machine	I-Architecture
built	O
especially	O
for	O
Rakudo	B-Language
and	O
the	O
NQP	O
Compiler	O
Toolchain	O
.	O
</s>
<s>
There	O
is	O
a	O
layer	O
between	O
Raku	B-Application
and	O
the	O
virtual	B-Architecture
machines	I-Architecture
called	O
Not	O
Quite	O
Perl	B-Application
6	I-Application
,	O
or	O
NQP	O
,	O
which	O
implements	B-Language
Raku	B-Language
rules	I-Language
for	O
parsing	B-Language
Raku	B-Application
,	O
as	O
well	O
as	O
an	O
abstract	B-Data_Structure
syntax	I-Data_Structure
tree	I-Data_Structure
and	O
backend-specific	O
code	B-Application
generation	I-Application
.	O
</s>
<s>
Large	O
portions	O
of	O
Rakudo	B-Language
are	O
written	O
in	O
Raku	B-Application
itself	O
,	O
or	O
in	O
its	O
subset	O
NQP	O
.	O
</s>
<s>
Rakudo	B-Language
is	O
not	O
a	O
completely	O
self-hosting	O
implementation	O
,	O
nor	O
are	O
there	O
concrete	O
plans	O
at	O
this	O
point	O
to	O
make	O
Rakudo	B-Language
a	O
bootstrapping	O
compiler	O
.	O
</s>
<s>
Pugs	B-Language
was	O
an	O
initial	O
implementation	O
of	O
Perl	B-Application
6	I-Application
written	O
in	O
Haskell	B-Language
.	O
</s>
<s>
Pugs	B-Language
used	O
to	O
be	O
the	O
most	O
advanced	O
implementation	O
of	O
Perl	B-Application
6	I-Application
,	O
but	O
since	O
mid	O
2007	O
it	O
is	O
mostly	O
dormant	O
(	O
with	O
updates	O
made	O
only	O
to	O
track	O
the	O
current	O
version	O
of	O
GHC	B-Application
)	O
.	O
</s>
<s>
As	O
of	O
November	O
2014	O
Pugs	B-Language
was	O
not	O
being	O
actively	O
maintained	O
.	O
</s>
<s>
In	O
2007	O
,	O
v6-MiniPerl6	O
(	O
"	O
mp6	O
"	O
)	O
and	O
its	O
reimplementation	O
,	O
v6-KindaPerl6	O
(	O
"	O
kp6	O
"	O
)	O
were	O
written	O
as	O
a	O
means	O
to	O
bootstrap	O
the	O
Perl-6.0.0	O
STD	O
,	O
using	O
Perl	B-Language
5	O
.	O
</s>
<s>
The	O
STD	O
is	O
a	O
full	O
grammar	O
for	O
Perl	B-Application
6	I-Application
and	O
is	O
written	O
in	O
Perl	B-Application
6	I-Application
.	O
</s>
<s>
In	O
theory	O
,	O
anything	O
capable	O
of	O
parsing	B-Language
the	O
STD	O
and	O
generating	O
executable	O
code	O
is	O
a	O
suitable	O
bootstrapping	O
system	O
for	O
Perl	B-Application
6	I-Application
.	O
kp6	O
is	O
currently	O
compiled	O
by	O
mp6	O
and	O
can	O
work	O
with	O
multiple	O
backends	O
.	O
</s>
<s>
mp6	O
and	O
kp6	O
are	O
not	O
full	O
Perl	B-Application
6	I-Application
implementations	O
and	O
are	O
designed	O
only	O
to	O
implement	O
the	O
minimum	O
featureset	O
required	O
to	O
bootstrap	O
a	O
full	O
Perl	B-Application
6	I-Application
compiler	O
.	O
</s>
<s>
Yapsi	O
was	O
a	O
Perl	B-Application
6	I-Application
compiler	O
and	O
runtime	O
written	O
in	O
Perl	B-Application
6	I-Application
itself	O
.	O
</s>
<s>
As	O
a	O
result	O
,	O
it	O
required	O
an	O
existing	O
Perl	B-Application
6	I-Application
interpreter	O
,	O
such	O
as	O
one	O
of	O
the	O
Rakudo	B-Language
Star	I-Language
releases	O
,	O
in	O
order	O
to	O
run	O
.	O
</s>
<s>
Niecza	O
,	O
another	O
major	O
Perl	B-Application
6	I-Application
implementation	O
effort	O
,	O
focused	O
on	O
optimization	O
and	O
efficient	O
implementation	O
research	O
.	O
</s>
<s>
The	O
Raku	B-Application
specification	O
requests	O
that	O
modules	B-Language
be	O
identified	O
by	O
name	O
,	O
version	O
,	O
and	O
authority	O
.	O
</s>
<s>
It	O
is	O
possible	O
to	O
load	O
only	O
a	O
specific	O
version	O
of	O
a	O
module	B-Language
,	O
or	O
even	O
two	O
modules	B-Language
of	O
the	O
same	O
name	O
that	O
differ	O
in	O
version	O
or	O
authority	O
.	O
</s>
<s>
As	O
a	O
convenience	O
,	O
aliasing	B-Application
to	O
a	O
short	O
name	O
is	O
provided	O
.	O
</s>
<s>
CPAN	B-Language
,	O
the	O
Perl	B-Language
module	I-Language
distribution	O
system	O
,	O
does	O
not	O
yet	O
handle	O
Raku	B-Application
modules	B-Language
.	O
</s>
<s>
Instead	O
a	O
prototype	O
module	B-Language
system	O
is	O
in	O
use	O
.	O
</s>
<s>
Perl	B-Language
and	O
Raku	B-Application
differ	O
fundamentally	O
,	O
though	O
in	O
general	O
the	O
intent	O
has	O
been	O
to	O
"	O
keep	O
Raku	B-Application
Perl	B-Language
"	O
,	O
so	O
that	O
Raku	B-Application
is	O
clearly	O
"	O
a	O
Perl	B-Language
programming	I-Language
language	I-Language
"	O
.	O
</s>
<s>
A	O
major	O
non-technical	O
difference	O
between	O
Perl	B-Language
and	O
Raku	B-Application
is	O
that	O
Raku	B-Application
began	O
as	O
a	O
specification	O
.	O
</s>
<s>
This	O
means	O
that	O
Raku	B-Application
can	O
be	O
re-implemented	O
if	O
needed	O
,	O
and	O
it	O
also	O
means	O
that	O
programmers	O
do	O
not	O
have	O
to	O
read	O
the	O
source	O
code	O
for	O
the	O
ultimate	O
authority	O
on	O
any	O
given	O
feature	O
.	O
</s>
<s>
In	O
contrast	O
,	O
in	O
Perl	B-Language
,	O
the	O
official	O
documentation	O
is	O
not	O
considered	O
authoritative	O
and	O
only	O
describes	O
the	O
behavior	O
of	O
the	O
actual	O
Perl	B-Language
interpreter	I-Language
informally	O
.	O
</s>
<s>
Any	O
discrepancies	O
found	O
between	O
the	O
documentation	O
and	O
the	O
implementation	O
may	O
lead	O
to	O
either	O
being	O
changed	O
to	O
reflect	O
the	O
other	O
,	O
a	O
dynamic	O
which	O
drives	O
the	O
continuing	O
development	O
and	O
refinement	O
of	O
the	O
Perl	B-Language
releases	O
.	O
</s>
<s>
In	O
Raku	B-Application
,	O
the	O
dynamic	O
type	O
system	O
of	O
Perl	B-Language
has	O
been	O
augmented	O
by	O
the	O
addition	O
of	O
static	O
types	O
.	O
</s>
<s>
Raku	B-Application
offers	O
a	O
gradual	O
typing	O
system	O
,	O
whereby	O
the	O
programmer	O
may	O
choose	O
to	O
use	O
static	O
typing	O
,	O
use	O
dynamic	O
typing	O
,	O
or	O
mix	O
the	O
two	O
.	O
</s>
<s>
Perl	B-Language
defines	O
subroutines	O
without	O
formal	O
parameter	O
lists	O
at	O
all	O
(	O
though	O
simple	O
parameter	O
counting	O
and	O
some	O
type	O
checking	O
can	O
be	O
done	O
using	O
Perl	B-Language
's	O
"	O
prototypes	O
"	O
)	O
.	O
</s>
<s>
Raku	B-Application
introduces	O
true	O
formal	O
parameters	O
to	O
the	O
language	O
.	O
</s>
<s>
In	O
Raku	B-Application
,	O
a	O
subroutine	O
declaration	O
looks	O
like	O
this	O
:	O
</s>
<s>
As	O
in	O
Perl	B-Language
,	O
the	O
formal	O
parameters	O
(	O
i.e.	O
,	O
the	O
variables	O
in	O
the	O
parameter	O
list	O
)	O
are	O
aliases	O
to	O
the	O
actual	O
parameters	O
(	O
the	O
values	O
passed	O
in	O
)	O
,	O
but	O
by	O
default	O
,	O
the	O
aliases	O
are	O
constant	O
so	O
they	O
cannot	O
be	O
modified	O
.	O
</s>
<s>
Raku	B-Application
provides	O
three	O
basic	O
modes	O
of	O
parameter	O
passing	O
:	O
positional	O
parameters	O
,	O
named	O
parameters	O
,	O
and	O
slurpy	O
parameters	O
.	O
</s>
<s>
Slurpy	O
parameters	O
(	O
indicated	O
by	O
an	O
*	O
before	O
the	O
parameter	O
name	O
)	O
are	O
Raku	B-Application
's	O
tool	O
for	O
creating	O
variadic	B-Language
functions	I-Language
.	O
</s>
<s>
Parameters	O
can	O
also	O
be	O
passed	O
to	O
arbitrary	O
blocks	O
,	O
which	O
act	O
as	O
closures	B-Language
.	O
</s>
<s>
This	O
is	O
generally	O
referred	O
to	O
as	O
a	O
"	O
pointy	O
sub	O
"	O
or	O
"	O
pointy	O
block	O
"	O
,	O
and	O
the	O
arrow	O
behaves	O
almost	O
exactly	O
like	O
the	O
sub	O
keyword	O
,	O
introducing	O
an	O
anonymous	O
closure	B-Language
(	O
or	O
anonymous	O
subroutine	O
in	O
Perl	B-Language
terminology	O
)	O
.	O
</s>
<s>
In	O
Perl	B-Language
,	O
sigils	O
the	O
punctuation	O
characters	O
that	O
precede	O
a	O
variable	O
name	O
change	O
depending	O
on	O
how	O
the	O
variable	O
is	O
used	O
:	O
</s>
<s>
In	O
Raku	B-Application
,	O
sigils	O
are	O
invariant	O
,	O
which	O
means	O
that	O
they	O
do	O
not	O
change	O
based	O
on	O
whether	O
it	O
is	O
the	O
array	O
or	O
the	O
array	O
element	O
that	O
is	O
needed	O
:	O
</s>
<s>
The	O
variance	O
in	O
Perl	B-Language
is	O
inspired	O
by	O
number	O
agreement	O
in	O
English	O
and	O
many	O
other	O
natural	O
languages	O
:	O
</s>
<s>
However	O
,	O
this	O
conceptual	O
mapping	O
breaks	O
down	O
when	O
using	O
references	O
,	O
since	O
they	O
may	O
refer	O
to	O
data	B-General_Concept
structures	I-General_Concept
even	O
though	O
they	O
are	O
scalars	O
.	O
</s>
<s>
Thus	O
,	O
dealing	O
with	O
nested	O
data	B-General_Concept
structures	I-General_Concept
may	O
require	O
an	O
expression	O
of	O
both	O
singular	O
and	O
plural	O
form	O
in	O
a	O
single	O
term	O
:	O
</s>
<s>
This	O
complexity	O
has	O
no	O
equivalent	O
either	O
in	O
common	O
use	O
of	O
natural	O
language	O
or	O
in	O
other	O
programming	O
languages	O
,	O
and	O
it	O
causes	O
high	O
cognitive	O
load	O
when	O
writing	O
code	O
to	O
manipulate	O
complex	O
data	B-General_Concept
structures	I-General_Concept
.	O
</s>
<s>
This	O
is	O
the	O
same	O
code	O
in	O
Raku	B-Application
:	O
</s>
<s>
Perl	B-Language
supports	O
object-oriented	B-Language
programming	I-Language
via	O
a	O
mechanism	O
known	O
as	O
blessing	O
.	O
</s>
<s>
A	O
blessed	O
object	O
can	O
have	O
methods	O
invoked	O
on	O
it	O
using	O
the	O
"	O
arrow	O
syntax	O
"	O
which	O
will	O
cause	O
Perl	B-Language
to	O
locate	O
or	O
"	O
dispatch	O
"	O
an	O
appropriate	O
subroutine	O
by	O
name	O
,	O
and	O
call	O
it	O
with	O
the	O
blessed	O
variable	O
as	O
its	O
first	O
argument	O
.	O
</s>
<s>
While	O
extremely	O
powerful	O
,	O
it	O
makes	O
the	O
most	O
common	O
case	O
of	O
object	O
orientation	O
,	O
a	O
struct-like	O
object	O
with	O
some	O
associated	O
code	O
,	O
unnecessarily	O
difficult	O
.	O
</s>
<s>
In	O
addition	O
,	O
because	O
Perl	B-Language
can	O
make	O
no	O
assumptions	O
about	O
the	O
object	B-Application
model	I-Application
in	O
use	O
,	O
method	B-Language
invocation	O
cannot	O
be	O
optimized	O
very	O
well	O
.	O
</s>
<s>
In	O
the	O
spirit	O
of	O
making	O
the	O
"	O
easy	O
things	O
easy	O
and	O
hard	O
things	O
possible	O
"	O
,	O
Raku	B-Application
retains	O
the	O
blessing	O
model	O
and	O
supplies	O
a	O
more	O
robust	O
object	B-Application
model	I-Application
for	O
the	O
common	O
cases	O
.	O
</s>
<s>
C++	B-Language
,	O
Java	B-Language
,	O
Python	B-Language
,	O
etc	O
.	O
)	O
</s>
<s>
that	O
have	O
coalesced	O
around	O
dot	O
as	O
the	O
syntax	O
for	O
method	B-Language
invocation	O
.	O
</s>
<s>
In	O
the	O
terminology	O
of	O
Raku	B-Application
,	O
$	O
.x	O
is	O
called	O
an	O
"	O
attribute	O
"	O
.	O
</s>
<s>
The	O
method	B-Language
used	O
to	O
access	O
an	O
attribute	O
is	O
called	O
an	O
"	O
accessor	O
"	O
.	O
</s>
<s>
An	O
auto-accessor	O
method	B-Language
is	O
a	O
method	B-Language
created	O
automatically	O
and	O
named	O
after	O
the	O
attribute	O
's	O
name	O
,	O
as	O
the	O
method	B-Language
x	O
is	O
in	O
the	O
example	O
above	O
.	O
</s>
<s>
The	O
Raku	B-Application
object	B-Language
system	I-Language
has	O
inspired	O
the	O
Moose	B-Language
framework	I-Language
that	O
introduces	O
many	O
of	O
Raku	B-Application
's	O
OOP	O
features	O
to	O
Perl	B-Language
.	O
</s>
<s>
Inheritance	B-Language
is	O
the	O
technique	O
by	O
which	O
an	O
object	O
or	O
type	O
can	O
re-use	O
code	O
or	O
definitions	O
from	O
existing	O
objects	O
or	O
types	O
.	O
</s>
<s>
Inheritance	B-Language
in	O
other	O
languages	O
,	O
such	O
as	O
Java	B-Language
,	O
is	O
provided	O
by	O
allowing	O
Classes	O
to	O
be	O
sub-classes	O
of	O
existing	O
classes	O
.	O
</s>
<s>
Raku	B-Application
provides	O
for	O
inheritance	B-Language
via	O
Classes	O
,	O
which	O
are	O
similar	O
to	O
Classes	O
in	O
other	O
languages	O
,	O
and	O
Roles	O
.	O
</s>
<s>
Roles	O
in	O
Raku	B-Application
take	O
on	O
the	O
function	O
of	O
interfaces	O
in	O
Java	B-Language
,	O
mixins	B-Language
in	O
Ruby	B-Language
,	O
and	O
traits	O
in	O
PHP	B-Application
and	O
in	O
the	O
Smalltalk	B-Application
variant	O
Squeak	B-Operating_System
.	O
</s>
<s>
These	O
are	O
used	O
to	O
perform	O
composition	O
when	O
used	O
with	O
classes	O
rather	O
than	O
adding	O
to	O
their	O
inheritance	B-Language
chain	O
.	O
</s>
<s>
Although	O
Roles	O
are	O
distinct	O
from	O
Classes	O
,	O
it	O
is	O
possible	O
to	O
write	O
Raku	B-Application
code	O
that	O
directly	O
instantiates	O
a	O
Role	O
or	O
uses	O
a	O
Role	O
as	O
a	O
type	O
object	O
,	O
Raku	B-Application
will	O
automatically	O
create	O
a	O
class	O
with	O
the	O
same	O
name	O
as	O
the	O
role	O
,	O
making	O
it	O
possible	O
to	O
transparently	O
use	O
a	O
role	O
as	O
if	O
it	O
were	O
a	O
class	O
.	O
</s>
<s>
Essentially	O
,	O
a	O
role	O
is	O
a	O
bundle	O
of	O
(	O
possibly	O
abstract	O
)	O
methods	O
and	O
attributes	O
that	O
can	O
be	O
added	O
to	O
a	O
class	O
without	O
using	O
inheritance	B-Language
.	O
</s>
<s>
A	O
role	O
can	O
even	O
be	O
added	O
to	O
an	O
individual	O
object	O
;	O
in	O
this	O
case	O
,	O
Raku	B-Application
will	O
create	O
an	O
anonymous	O
subclass	O
,	O
add	O
the	O
role	O
to	O
the	O
subclass	O
,	O
and	O
change	O
the	O
object	O
's	O
class	O
to	O
the	O
anonymous	O
subclass	O
.	O
</s>
<s>
In	O
order	O
to	O
show	O
inheritance	B-Language
from	O
a	O
class	O
,	O
there	O
is	O
a	O
different	O
keyword	O
is	O
.	O
</s>
<s>
Perl	B-Language
's	O
regular	B-Language
expression	I-Language
and	O
string-processing	O
support	O
has	O
always	O
been	O
one	O
of	O
its	O
defining	O
features	O
.	O
</s>
<s>
Since	O
Perl	B-Language
's	O
pattern-matching	O
constructs	O
have	O
exceeded	O
the	O
capabilities	O
of	O
regular	B-General_Concept
language	I-General_Concept
expressions	O
for	O
some	O
time	O
,	O
Raku	B-Application
documentation	O
exclusively	O
refers	O
to	O
them	O
as	O
regexes	B-Language
,	O
distancing	O
the	O
term	O
from	O
the	O
formal	O
definition	O
.	O
</s>
<s>
Raku	B-Application
provides	O
a	O
superset	O
of	O
Perl	B-Language
features	O
with	O
respect	O
to	O
regexes	B-Language
,	O
folding	O
them	O
into	O
a	O
larger	O
framework	O
called	O
"	O
rules	B-Language
"	O
which	O
provide	O
the	O
capabilities	O
of	O
context-sensitive	O
parsing	B-Language
formalisms	O
(	O
such	O
as	O
the	O
syntactic	B-Application
predicates	I-Application
of	O
parsing	B-Language
expression	O
grammars	O
and	O
ANTLR	B-Application
)	O
,	O
as	O
well	O
as	O
acting	O
as	O
a	O
closure	B-Language
with	O
respect	O
to	O
their	O
lexical	B-Language
scope	I-Language
.	O
</s>
<s>
Rules	B-Language
are	O
introduced	O
with	O
the	O
rule	O
keyword	O
which	O
has	O
a	O
usage	O
quite	O
similar	O
to	O
subroutine	O
definition	O
.	O
</s>
<s>
Anonymous	O
rules	B-Language
can	O
also	O
be	O
introduced	O
with	O
the	O
regex	B-Language
(	O
or	O
rx	O
)	O
keyword	O
,	O
or	O
they	O
can	O
simply	O
be	O
used	O
inline	O
as	O
regexps	B-Language
were	O
in	O
Perl	B-Language
via	O
the	O
m	O
(	O
matching	O
)	O
or	O
s	O
(	O
substitute	O
)	O
operators	O
.	O
</s>
<s>
In	O
Apocalypse	O
5	O
,	O
Larry	O
Wall	O
enumerated	O
20	O
problems	O
with	O
"	O
current	O
regex	B-Language
culture	O
"	O
.	O
</s>
<s>
Among	O
these	O
were	O
that	O
Perl	B-Language
's	O
regexes	B-Language
were	O
"	O
too	O
compact	O
and	O
'	O
cute	O
 '	O
"	O
,	O
had	O
"	O
too	O
much	O
reliance	O
on	O
too	O
few	O
metacharacters	O
"	O
,	O
"	O
little	O
support	O
for	O
named	O
captures	O
"	O
,	O
"	O
little	O
support	O
for	O
grammars	O
"	O
,	O
and	O
"	O
poor	O
integration	O
with	O
'	O
real	O
 '	O
language	O
"	O
.	O
</s>
<s>
Some	O
Perl	B-Language
constructs	O
have	O
been	O
changed	O
in	O
Raku	B-Application
,	O
optimized	O
for	O
different	O
syntactic	O
cues	O
for	O
the	O
most	O
common	O
cases	O
.	O
</s>
<s>
For	O
example	O
,	O
the	O
parentheses	O
(	O
round	O
brackets	O
)	O
required	O
in	O
control	O
flow	O
constructs	O
in	O
Perl	B-Language
are	O
now	O
optional	O
:	O
</s>
<s>
Raku	B-Application
allows	O
comparisons	O
to	O
"	O
chain	O
"	O
.	O
</s>
<s>
Raku	B-Application
uses	O
the	O
technique	O
of	O
lazy	O
evaluation	O
of	O
lists	O
that	O
has	O
been	O
a	O
feature	O
of	O
some	O
functional	B-Language
programming	I-Language
languages	I-Language
such	O
as	O
Haskell	B-Language
:	O
</s>
<s>
This	O
simplifies	O
many	O
common	O
tasks	O
in	O
Raku	B-Application
including	O
input/output	O
operations	O
,	O
list	O
transformations	O
,	O
and	O
parameter	O
passing	O
.	O
</s>
<s>
Related	O
to	O
lazy	O
evaluation	O
is	O
the	O
construction	O
of	O
lazy	O
lists	O
using	O
gather	O
and	O
take	O
,	O
behaving	O
somewhat	O
like	O
generators	O
in	O
languages	O
like	O
Icon	B-Language
or	O
Python	B-Language
.	O
</s>
<s>
Raku	B-Application
introduces	O
the	O
concept	O
of	O
junctions	O
:	O
values	O
that	O
are	O
composites	O
of	O
other	O
values	O
.	O
</s>
<s>
Junctions	O
can	O
also	O
be	O
used	O
to	O
more	O
richly	O
augment	O
the	O
type	O
system	O
by	O
introducing	O
a	O
style	O
of	O
generic	B-Language
programming	I-Language
that	O
is	O
constrained	O
to	O
junctions	O
of	O
types	O
:	O
</s>
<s>
In	O
low-level	O
languages	O
,	O
the	O
concept	O
of	O
macros	O
has	O
become	O
synonymous	O
with	O
textual	O
substitution	O
of	O
source-code	O
due	O
to	O
the	O
widespread	O
use	O
of	O
the	O
C	B-Language
preprocessor	I-Language
.	O
</s>
<s>
However	O
,	O
high-level	O
languages	O
such	O
as	O
Lisp	B-Language
pre-dated	O
C	O
in	O
their	O
use	O
of	O
macros	O
that	O
were	O
far	O
more	O
powerful	O
.	O
</s>
<s>
It	O
is	O
this	O
Lisp-like	O
macro	O
concept	O
that	O
Raku	B-Application
will	O
take	O
advantage	O
of	O
.	O
</s>
<s>
The	O
power	O
of	O
this	O
sort	O
of	O
macro	O
stems	O
from	O
the	O
fact	O
that	O
it	O
operates	O
on	O
the	O
program	O
as	O
a	O
high-level	O
data	B-General_Concept
structure	I-General_Concept
,	O
rather	O
than	O
as	O
simple	O
text	O
,	O
and	O
has	O
the	O
full	O
capabilities	O
of	O
the	O
programming	O
language	O
at	O
its	O
disposal	O
.	O
</s>
<s>
A	O
Raku	B-Application
macro	O
definition	O
will	O
look	O
like	O
a	O
subroutine	O
or	O
method	B-Language
definition	O
,	O
and	O
it	O
can	O
operate	O
on	O
unparsed	O
strings	O
,	O
an	O
AST	B-Data_Structure
representing	O
pre-parsed	O
code	O
,	O
or	O
a	O
combination	O
of	O
the	O
two	O
.	O
</s>
<s>
In	O
this	O
particular	O
example	O
,	O
the	O
macro	O
is	O
no	O
more	O
complex	O
than	O
a	O
C-style	O
textual	O
substitution	O
,	O
but	O
because	O
parsing	B-Language
of	O
the	O
macro	O
parameter	O
occurs	O
before	O
the	O
macro	O
operates	O
on	O
the	O
calling	O
code	O
,	O
diagnostic	O
messages	O
would	O
be	O
far	O
more	O
informative	O
.	O
</s>
<s>
However	O
,	O
because	O
the	O
body	O
of	O
a	O
macro	O
is	O
executed	O
at	O
compile	B-Application
time	I-Application
each	O
time	O
it	O
is	O
used	O
,	O
many	O
techniques	O
of	O
optimization	O
can	O
be	O
employed	O
.	O
</s>
<s>
It	O
is	O
even	O
possible	O
to	O
eliminate	O
complex	O
computations	O
from	O
resulting	O
programs	O
by	O
performing	O
the	O
work	O
at	O
compile-time	B-Application
.	O
</s>
<s>
In	O
Perl	B-Language
,	O
identifier	O
names	O
can	O
use	O
the	O
ASCII	O
alphanumerics	O
and	O
underscores	O
also	O
available	O
in	O
other	O
languages	O
.	O
</s>
<s>
In	O
Raku	B-Application
,	O
the	O
alphanumerics	O
can	O
include	O
most	O
Unicode	O
characters	O
.	O
</s>
<s>
In	O
Raku	B-Application
,	O
hello	O
world	O
is	O
:	O
</s>
<s>
though	O
there	B-Architecture
is	I-Architecture
more	I-Architecture
than	I-Architecture
one	I-Architecture
way	I-Architecture
to	I-Architecture
do	I-Architecture
it	I-Architecture
.	O
</s>
<s>
The	O
factorial	O
function	O
in	O
Raku	B-Application
,	O
defined	O
in	O
a	O
few	O
different	O
ways	O
:	O
</s>
<s>
Quicksort	B-Algorithm
is	O
a	O
well-known	O
sorting	O
algorithm	O
.	O
</s>
<s>
A	O
working	O
implementation	O
using	O
the	O
functional	B-Language
programming	I-Language
paradigm	O
can	O
be	O
succinctly	O
written	O
in	O
Raku	B-Application
:	O
</s>
<s>
Tower	B-Language
of	I-Language
Hanoi	I-Language
is	O
often	O
used	O
to	O
introduce	O
recursive	O
programming	O
in	O
computer	O
science	O
.	O
</s>
<s>
This	O
implementation	O
uses	O
Raku	B-Application
's	O
multi-dispatch	O
mechanism	O
and	O
parametric	O
constraints	O
:	O
</s>
<s>
In	O
the	O
history	O
of	O
Raku	B-Application
there	O
were	O
two	O
waves	O
of	O
book	O
writing	O
.	O
</s>
<s>
The	O
first	O
wave	O
followed	O
the	O
initial	O
announcement	O
of	O
Perl	B-Application
6	I-Application
in	O
2000	O
.	O
</s>
<s>
Perl	B-Application
6	I-Application
and	O
Parrot	O
Essentials	O
,	O
1st	O
edition	O
,	O
2003	O
,	O
</s>
<s>
Also	O
,	O
a	O
book	O
dedicated	O
to	O
one	O
of	O
the	O
first	O
Perl	B-Application
6	I-Application
virtual	B-Architecture
machines	I-Architecture
,	O
Parrot	O
,	O
was	O
published	O
in	O
2009	O
.	O
</s>
<s>
There	O
are	O
a	O
few	O
reports	O
from	O
different	O
authors	O
about	O
the	O
new	O
books	O
that	O
are	O
going	O
to	O
be	O
published	O
soon	O
,	O
all	O
based	O
on	O
the	O
current	O
version	O
1.0	O
(	O
known	O
as	O
version	O
6.c	O
)	O
of	O
Perl	B-Application
6	I-Application
.	O
</s>
<s>
Migrating	O
to	O
Perl	B-Application
6	I-Application
.	O
</s>
<s>
An	O
Easy	O
Transition	O
from	O
Perl	B-Language
5	O
.	O
.	O
</s>
