
A Review of Perl 6 - jparise
http://www.evanmiller.org/a-review-of-perl-6.html
======
23409125
Subpar performance is a huge drawback of Perl 6.

I usually don't program in Perl, but occasionally use it instead of sed.

Compare, Perl 5 vs. Perl 6:

    
    
        $ time yes | head -n1000000 | perl -pe 's/y/n/' >/dev/null
    
        real	0m0.945s
        user	0m0.944s
        sys	0m0.016s
        $ time yes | head -n1000000 | perl6 -pe 's/y/n/' >/dev/null
    
        real	2m49.881s
        user	2m44.892s
        sys	0m2.184s
    

Spending several minutes to do what can be done in under 1 second is just
unacceptable.

~~~
davemp
> \d now matches Unicode digits such as ᭕ (a Balinese five) and ๓ (a Thai
> three).

This sounds like a disaster waiting to happen.

~~~
perlancar3
It has been like that since forever (at least since 5.10, 2007). To only match
0-9, use [0-9] or /\d/a (/a is available since 5.14, 2011).

------
fnj
I found this a nifty intro to perl6. I am a 70 year old retiree and have 37
years of C programming and some C++, perl5, and other languages. This is the
first time I've been able to make the slightest headway digging perl6.

~~~
pcunite
_I am a 70 year old retiree and have 37 years of C programming_

That's awesome. Thank you for joining the community here. I have a lot of
respect for our elders. New technology gets written about using old
technology.

~~~
sethrin
fnj is also a longtime community member of Slashdot, and well regarded.

------
wodenokoto
A lot of people here seems to think there is a lot of potential for perl6,
with the only complaints being the name and its speed, with at least speed
expected to improve.

But I thought this review sounded pretty damning.

Numerical operations are opaque as you never quite know if it's a rational or
a float.

The grammar engine is inferior to other languages 3rd party modules, hard to
debug and seems to not be suitable for its main purpose (parsing perl6!)

Everything seems to be writable in a multitude of ways with no clear
indication if these ways are functionally different.

I do a lot of NLP in python and I wish for better tools to munge and clean up
my text data, and have been curious about perl6, but after reading this review
I don't find Perl all that enticing at all.

~~~
perlgeek
> Numerical operations are opaque as you never quite know if it's a rational
> or a float.

Not so. When you put in floats, you get floats out. If you want always-
rational numbers, put in FatRat and you get out FatRat -- with the predictable
bad performance on algorithms that converge on irrational numbers.

> The grammar engine is inferior to other languages 3rd party modules

Nothing stops you from using superior 3rd party modules in Perl 6. Heck, you
can use Python modules through Inline::Python in Perl 6.

> hard to debug

I haven't found it harder to debug than other parser libraries, but your
mileage my vary. I'm a fan of Grammar::Tracer, which hasn't failed me yet.

> Everything seems to be writable in a multitude of ways with no clear
> indication if these ways are functionally different.

That is true, but I find it irksome that you mention it right next to Python,
which also has a multitude of ways to do different things, even though the Zen
of Python says there should be just one way. Think string formatting, for
example. I believe it's a trait of every programming language that doesn't set
out to babysit you.

~~~
wodenokoto
Thank you for inputs on the specifics.

Would you say the reviewer/author is misunderstanding Perl6, or that I am
misunderstanding the review?

~~~
Ultimatt
I think you are reading in too much the criticism of how grammars work.
Ultimately the leading compiler uses the Perl 6 grammar engine and tooling to
implement the language compiler! So if your needs are substantially less
complex than needing to implement your own programming language, say parse
some XML or something. Then the grammar engine is more than competent. The
authors criticism of how to handle errors during parse and making a really
advanced robust parser is definitely fair. However, the technology for doing
this in a deep way does exist. It's already found in the grammar debugger
module from one of the core devs ([https://github.com/jnthn/grammar-
debugger](https://github.com/jnthn/grammar-debugger)). There just isn't
perhaps a nicer "user" level API for you handling parsing in a flexible way
when something goes wrong. There are mechanisms for making your grammar
flexible though such as proto rules/tokens/regexes
[https://docs.perl6.org/language/grammars#Protoregexes](https://docs.perl6.org/language/grammars#Protoregexes)
here when different options are encountered you can trigger different code to
handle whats being parsed.

------
kibwen
This is an interesting article overall, but I'm unsure what this part is
trying to say:

 _> Perl 6 is aware of graphemes and combining codepoints, and unlike Python,
Swift, or Elixir, Perl 6 can can access arbitrary graphemes by position in
constant time, rather than iterating over every grapheme to access a
particular one. [...] Graphemes are stored internally as 32-bit integers; this
address space is large enough to contain all legal codepoint combinations_

It sounds like Perl6 is simply storing strings as UTF-32. AFAIK, there's
nothing called a "grapheme" in Unicode; the closest I know of are "grapheme
clusters", which are theoretically unbounded in size and so cannot simply be
stored in a 32-bit integer. Maybe by "grapheme" the author means "Unicode
scalar value"? But being able to access those in constant time isn't
especially useful, AFAIK.

~~~
cygx
Perl6 extends (NFC normalized) UTF-32 with autogenerated 'synthetic' codpoints
for grapheme clusters. This yields an upper bound for the number of unique
multi-codepoint grapheme clusters a Perl6 program may encounter (something
like 2^31 as I believe only negative numbers are used for synthetics).

~~~
kibwen
Is there a document somewhere describing Perl6's string implementation more
precisely? To the best of my knowledge this can't be done, since not only is
it legal for combining characters to appear an unlimited number of times in a
single grapheme cluster, even discounting repetition the number of legal
combinations of single combining characters is surely larger than 2^31. It
seems self-evident that if all theoretically-legal combinations of codepoints
fit into a 32-bit space, then we just wouldn't bother with combining
characters and would use precomposed glyphs exclusively!

~~~
cygx
Not everything that's theoretically unsound is a problem in practice (eg a
128-bit address space would clearly be large enough - there are only so many
atoms on the surface of the earth, and the number of glyphs written by humans
is quite a bit smaller than that...)

~~~
kibwen
This is exactly what I'm asking though; if they decided to treat some bespoke
combinations of combining characters as though they were precomposed, then I'm
curious how they generated that list, and I'm curious what fallback behavior
it has for grapheme clusters that aren't specifically accounted for in this
way. I'm also sort of curious what their rationale is for doing any of this in
the first place, since it seems like the benefit of constant-time indexing
isn't especially useful given the memory tradeoffs.

~~~
Someone
From what I understand, those _" autogenerated 'synthetic' codepoints"_ aren't
guaranteed to be identical across runs (and typically won't be).

What they do is a bit like LZW compression: use a set of codes that is larger
than the number of simple graphemes, assign each simple grapheme its 'normal'
code and, whenever one encounters a complex one, assign it the first hitherto
unused 'code point'.

That works fine until it breaks. They hope it never breaks in practice. I
think there's a good chance it won't, but still don't think this is a good
idea.

~~~
cygx
_those "autogenerated 'synthetic' codepoints" aren't guaranteed to be
identical across runs_

Indeed: It's not an exchange format, but the format of the internal in-memory
string representation.

~~~
kibwen
If it's only intended as an in-memory representation, then how about a 24-bit
representation, which is just as likely to work "in practice, if not in
theory" as the 32-bit representation, while saving 25% of the memory? That
gives you 16 million unique grapheme clusters per program instance, which,
heck, is probably still more than 99% of programs use; you could easily get
away with a 16-bit representation and use no more memory for strings than
Java, C#, or Javascript. It's not like using a unique superset of UTF-32 is
saving anyone the hassle of needing to convert between formats, since the vast
majority of the world is ASCII-ish, UTF-8, and UTF-16 anyway.

~~~
cygx
> how about a 24-bit representation

Because 24-bit integers are not a thing on x86?

~~~
kibwen
Who says you need to use integers? You're completely ignoring my question.
Again, if you know of a design doc buried on a mailing list somewhere please
just link me to that so that I can answer all of my questions at once.

------
zaro
> ... but I personally prefer to be treated like a responsible adult rather
> than, for instance, a teenager trapped in the father-knows-best house of Go.

My feelings exactly.

~~~
lostcolony
Oh, -I- should be treated like a responsible adult, -but those maniacs I work
with shouldn't be-.

Is the language for individuals, or for teams? Is it for software developers,
or dabblers from other domains who have to crank out a bit of code?

~~~
atemerev
Perl always was, and still is, a hacker's language. It is for individuals who
want to get shit done NOW, disregarding maintainability or teamwork. For this
particular niche, it is indispensable.

~~~
lostcolony
Not saying otherwise. I, personally, prefer languages I can come back to a
month later and figure out what the hell -I- was thinking, let alone someone
else, but I understand the appeal.

My point was that it's not really a pro/con of a language on whether it favors
individuals hacking, or teams developing, but merely a consideration for its
appropriateness to your problem, and so to say "I prefer" needs to be
qualified as to -when- it's preferable.

------
pram
Its been endlessly stated but naming it 'Perl 6' was a huge mistake. Perl 5
has an enduring reputation for crufty, unmaintainable code written by
graybeard sysadmins. I wrote a lot myself that I wouldn't want to ever deal
with again. I think they would have benefitted from a clean break from a
marketing perspective, especially considering it's completely different.

~~~
jfoutz
Perl 5 was my first love as a programming language. I rarely use it now, but
it will always have a special place in my heart. I learned so much with that
language. Blessing a regex for example. That was the first time I felt like I
had a super power.

~~~
smegel
Perl 5 is still a great replacement for sed and awk in one-liners. Which is
what it was originally envisaged as (although more than just one-liners), and
is probably how it should survive - the most powerful one-line tool in
existence.

~~~
goatlover
With all due respect to APL?

~~~
throwaway7645
I think they mean Nix terminal work. APL & J obviously win hands down as
overal one-liner kings. Can Dyalog be used via the terminal in that manner?
I'm guessing so, but never seen it used outside the IDE.

------
donaldihunter
If you want good error reporting from grammars then you really need to
implement a FAILGOAL in the grammar. For example:

    
    
      method FAILGOAL($goal) { die "cannot find $goal near position {self.pos}" }
    

There is also a very helpful grammar tracer and debugger when developing a
grammar:

    
    
      use Grammar::Tracer;
    

or

    
    
      use Grammar::Debugger;
    

[https://github.com/jnthn/grammar-debugger](https://github.com/jnthn/grammar-
debugger)

~~~
thormick
I managed to not only read that several times over as FAILGOAT, but think
that, yes, that sounds like an awesome solution.

------
s_kilk
Perl6 feels like it could be the ultimate language for Man, Machine, Mineral,
and Beast, if only we could teleport into a parallel universe where it war
already in widespread usage. The sense of sheer potential off the language is
intoxicating.

I like to imagine the Geth in Mass Effect run on a hybrid Perl6/Erlang
platform.

~~~
zoffix222
Funny you mentioning Geth... Perl 6's core devs use a bot named Geth to report
new commits on IRC. And.... it's written in Perl 6 (
[https://github.com/perl6/geth](https://github.com/perl6/geth) ) :)

~~~
floatboth
heh, same name as the _G_ o _Eth_ ereum client
[https://geth.ethereum.org/](https://geth.ethereum.org/)

------
Sean1708

      $ perl6
      To exit type 'exit' or '^D'
      > 0.3 == 3e-1
      False
    

I'm really really not sure how I feel about this. Does anyone know why the
decision was made to make exponential notation return a float while decimal
notation returns a rational?

~~~
grondilu
The "e" notation is an explicit reference to the floating point
representation, so it should obviously use it.

But decimal literal numbers (that is, not using the "e" notation) are best
represented with rational values, in the sense that they don't need any
approximation, so there really is no reason to use floating points for them.

~~~
ryebit
The "e" notation is just a shorthand for multiplying by a power of ten. I was
kinda surprised when the article stated that "5.23e5" wasn't treated the same
as as "5.23 * 10 * * 5". Mathematically, rational to an integer power is
always rational. This strikes me more as a half-measure that can cause
surprise and unpredictability.

edit: can't get double-asterisk to get through HN's markup :(

~~~
grondilu
Fine, but then how do you suggest one should write floating point literal
values?

PS. I guess there is the "f" suffix as in C++. Well, for some reason that's
not what Perl 6 decided. I, for one, think it's simple enough to use the "e"
notation. If you want to write a Rat with a power of ten, you can always
literally write say

    
    
        1.2*10**3

~~~
ryebit
I don't have a ready obvious alternative (though I do see others suggested an
"f" suffix). The lack of alternative was sort of my point... language design
is tricky, and small features in one place can paint you into a corner when
implementing another.

Establishing the right dynamic tension between those features (and the parser,
and the VM, and the user's mental model) definitely makes language design one
of the high arts in the computer world.

I'm not even saying this was the wrong decision; just that it causing a
surprising deviation from how numeric literals behave in other languages.

But Perl's goal has always seemed to me to be less about creating a rigorous
language with well defined types that map to the low level; and more about
creating an expressive feeling (to humans) language, where fundamental
differences in type were merely an implementation detail.

So I'm not surprised that it deviates from the norm in some interesting ways;
I'm just not sure if I personally like the feel when I try to speak it :)

... but I might think to close to the metal to be the target audience.

------
grondilu
I'm a bit disappointed about grammars. Usually, when I try to use them, it
gets difficult. Especially when recursion is involved. Lately, for instance, I
was reading the ECMAScript 2016 reference, and in it they define a repetition
of elements with recursion[1]:

    
    
        ArgumentList:
            AssignmentExpression
            ArgumentList , AssignmentExpression
    

I've never managed to do something like that with Perl 6's grammar. Basically
every time I try to use recursion, it doesn't quite work unless I do some
tricks.

Maybe I ask too much, I don't know.

1\. [http://www.ecma-
international.org/ecma-262/7.0/index.html#se...](http://www.ecma-
international.org/ecma-262/7.0/index.html#sec-ecmascript-language-lexical-
grammar)

~~~
Ultimatt
Huh? Not sure I know what you mean, because something like the following
trivially works?

    
    
        grammar LOL {
            rule TOP { <string> }
            rule string { <[a..z]><string>? }
        }
    
        my @lulz = LOL.parse("abcdef");
        say @lulz;
    

\---

    
    
        [｢abcdef｣
         string => ｢abcdef｣
          string => ｢bcdef｣
           string => ｢cdef｣
            string => ｢def｣
             string => ｢ef｣
              string => ｢f｣]

~~~
grondilu
I didn't say recursion never works. I say most of the times, it doesn't. There
is no alternation in the example you provide, for instance.

Had you written it like this:

    
    
        grammar {
            rule TOP { <string> }
            rule string { <[a..z]> | <string><[a..z]> }
        }
    

as inspired by the rule mentioned above in the ECMAscript reference, it would
fail.

~~~
zengargoyle
I'm probably off the mark a little bit.... but 'rule' implies that whitespace
is really <.ws> (totally ignored white space matching thingy). '|' is the
Longest-Match-First (different from Perl/PCRE/etc). LMF is not possible in the
case where it is not a DFA... the implicit <.ws> that is there by using 'rule'
and having a space might be your problem... :)

TL;DR Don't forget that 'rule' does <.ws> magic. This may or may not actually
be part of the problem...

I have seen a similar sort of thing and only half understand the answer i
got.. Check your implicit <.ws> and '|' LMF.

~~~
grondilu
I had tried replacing 'rule' by 'token' and it did not change much.

------
igravious
Superb; enjoyable write up. Very witty in parts, no puns in sight. Makes me
want to try Perl6 out.

~~~
breatheoften
I also enjoyed the article but came away with absolutely no desire to ever use
or encounter perl6.

~~~
KGIII
The 6 is for the number of users. ;-)

On a more serious note, your comment is pretty much what I've seen most people
say. I will probably poke at it, at some point. I won't have a good reason to
do so, except just to learn.

~~~
throwaway7645
There is more than you think and I expect a decent amount of people to come
over from Perl5, Ruby, and Python if the language gets optimized enough. Just
for small stuff at first, but in larger numbers as the libraries start to show
up

------
wott
> _Modifiers (i for case-insenstive is the most important one) can appear
> inside a regex when preceded by a colon. For example, this Perl 5 regex:_

> _(Male|Female) (?:[Cc][Aa][Tt]|[Dd][Oo][Gg])_

> _would be translated to Perl 6 as:_

> _(Male || Female) ' ' [:i cat || dog]_

Perl 5 does support this feature:

(Male|Female) ((?i)cat|dog)

or:

(Male|Female) (?i:cat|dog)

~~~
b2gills
Also I would use

    
    
        ( Male | Female )
    

in Perl 6, as it tries to match both in parallel.

The reason the version with || is in P5-to-p6 is that is how | works in Perl
5.

------
mncharity
FWIW, I note my own trigger for revisiting Perl 6, is the existence of a
standards-compliant transliterating implementation of another language, say
Javascript, written in Perl 6. No ambiguity, just "does it pass the validation
suite?", and "how fast is it?". A decade of "it's usable _now_!" has left that
sentence with little signal weight for me.

The idea is, at least as of a decade ago, it was straightforward to massage
the then ECMA spec into Perl 6 code. The spec says "Go to step 4 ... 4. ..."?
Well, "goto Step_4;... Step_4: ..." is code. And so on. Perl 6, at least as
envisioned then, is a very nice language for language implementation.
Implementation often goes like this: most of the language is easy, nicely
compatible with the target; some of it is hard, requiring some struggle to
impedance match; and tiny bit of it is impossible, or nearly so, or requires
rewriting all the rest, because of "gotcha" conflicts with the target
semantics. With a rich kitchen-sink target, almost everything becomes easier,
and there's likely some hook you can use to get that impossible bit done. And
when writing a compiler, (then, almost) general grammars, and multiple
dispatch with type sets, is a nice place to be.

But the corollary is, when I don't see a compliant ES2017 transliterated to
Perl 6, then I assume something is wrong - something isn't working yet - be it
unfortunate spec, or "doesn't quite work yet at scale" implementation, or
community.

------
bloaf
The "whatever star" seems like a less-well-implemented version of Wolfram
Language's pure anonymous functions:

[http://www.wolfram.com/language/elementary-
introduction/2nd-...](http://www.wolfram.com/language/elementary-
introduction/2nd-ed/26-pure-anonymous-functions.html)

Essentially, WL uses # instead of * and requires a "&" to indicate when you're
done defining your function. So the WL equivalent to Perl's

    
    
        (1, 2, 3).map: * * 2 
    

is

    
    
        Map[ #*2&, {1,2,3}] 
    

(idiomatically you would use /@ as shorthand for Map[], so it would be)

    
    
        #*2&/@{1,2,3}
    

Except WL is far more general with what you can do with #, and you can do
things like this:

    
    
        Outer[ #1 * #2 &, {1,2,3}, {4,5,6}]
    

which returns

    
    
        {{4, 5, 6}, {8, 10, 12}, {12, 15, 18}}
    

because #1 * #2 & defines a function of _two_ arguments, and "Outer" feeds the
lists into that function. You can even use ## to refer to all the arguments
passed into that function (regardless of how many arguments there are), so

    
    
        Outer[## &, {1, 2, 3}, {4, 5, 6}]
    

returns

    
    
        {{1, 4, 1, 5, 1, 6}, {2, 4, 2, 5, 2, 6}, {3, 4, 3, 5, 3, 6}}
    

And you can even do stuff like:

    
    
        f[x_] := x^2
        Outer[ #1[#2] &, {e, f, g}, {4, 5, 6}]
    

to get

    
    
        {{e[4], e[5], e[6]}, {16, 25, 36}, {g[4], g[5], g[6]}}

~~~
lmm
Scala had it before WL, with "_" which can be used with two or more arguments
where necessary. I suspect other languages had it earlier than that.

It's a very useful shorthand, although it becomes less necessary with properly
first class functions and/or currying by default. E.g. I don't know if Haskell
has it at all, but it doesn't need it.

~~~
bloaf
[http://reference.wolfram.com/language/ref/Slot.html?q=Slot](http://reference.wolfram.com/language/ref/Slot.html?q=Slot)

At the bottom of the page, it says:

>Introduced in 1988 (1.0)

So WL had this syntax several years before the JVM was even invented.

~~~
lmm
Hmm, I thought I remembered WL being announced a few years ago, long after I
was using this stuff on the JVM.

------
thyrsus
To what extent is Perl 6 now stable? I was at a LISA conference in December
2011, and watched Tobias Oetiker present the wonders of Perl 6, and though I
loved what I saw, something more than a tenth of his examples broke because of
recent revisions, whether semantic or to implementation. God bless the
language explorers, but my takeaway was "not yet". Is now the time?

~~~
fnj
I would say perl6 was stable as of the Christmas 2015 release of rakudo.

------
b2gills

        ｢Man is amazing, but he is not a masterpiece｣
    

Is different than the other two, it can be thought of as short for

    
    
        Q ｢Man is amazing, but he is not a masterpiece｣
    

While the others are short for

    
    
        qq “Man is amazing, but he is not a masterpiece”
    

Which is short for

    
    
        Q :qq “Man is amazing, but he is not a masterpiece”
        Q :double “Man is amazing, but he is not a masterpiece”
    

Which is also short for

    
    
        Q :s :a :h :f :b :c “Man is amazing, but he is not a masterpiece”
        Q :scalar :array :hash :function :backslash :closure “Man is amazing, but he is not a masterpiece”
    

For more information see the [Quoting
Constructs]([https://docs.perl6.org/language/quoting](https://docs.perl6.org/language/quoting))
documentation.

\---

There are modules for [debugging and
tracing]([https://github.com/jnthn/grammar-
debugger](https://github.com/jnthn/grammar-debugger)) Grammars.

A regex is just a special kind of method by the way.

    
    
        say Regex.^mro;
        # ((Regex) (Method) (Routine) (Block) (Code) (Any) (Mu))
    

Which is part of the reason it doesn't have some of the niceties of parser
generators built-in yet. The main reason is it got to a working state, then
other features needed more designing at that point.

\---

    
    
        # Perl 5
        /(Male|Female) (?:[Cc][Aa][Tt]|[Dd][Oo][Gg])/
        # is better written as
        /(Male|Female) (?i:cat|dog)/
    

In Perl 6 you can turn on and off sigspace mode

    
    
        /:s (:!s Male | Female ) [:!s:i cat | dog ]/
        # or fully spelled out
        /:sigspace (:!sigspace Male | Female ) [:!sigspace :ignorecase cat | dog ]/
    
        # or just use spaces more sparingly
        /:s ( Male| Female) [:i cat| dog]/
    

Note that in this case it is more like

    
    
        /( Male | Female ) \s+ [:i cat | dog ]/
    

In other contexts it could be slightly different. Basically it ignores
insignificant whitespace.

Note that `( a || b )` is more like the Perl 5 behaviour, but `( a | b )`
tries both in parallel with longest literal match.

Regular expressions are also the reason `:35minutes` is in the language by the
way

    
    
        say 'a ab abc' ~~ m:3rd/ \S+ /;
        # ｢abc｣
    

Rather than make it a special syntax, it was generalized so it can be used
everywhere.

\---

The asterix in a Term position turns into a Whatever, when that is part of an
expression it turns into a positional parameter of a WhateverCode.

    
    
        $deck.pick(*); # randomized deck of cards
        $deck.pick(Whatever.new); # ditto
    
        $dice.roll(*); # infinite list of random rolls of a die
        $dice.roll(Whatever.new); # ditto
    
        %a.sort( *.value ); # sort the Pairs by value (rather than key then value)
        %a.sort( -> $_ { .value } ); # ditto
    

Note that the last asterix was part of an expression, while the others
weren't.

    
    
        my &shuffle = *.pick(*); # only the first * represents a parameter to the lambda
                                 # the other is an argument to the pick method
    

The main reason I think for its addition to the language is for indexing in an
array

    
    
        @a[ * - 1 ];
    

Rather than make it a special syntax exclusively for index operations, it was
made a general lambda creation syntax.

I will agree that it takes some getting used to, but it is not intractable.
WhateverCode lambdas should also only be used for very short code, as it can
get difficult to understand in a hurry.

\---

A `$_` inside of `{ }` creates a bare block lambda, basically this removes the
specialness of Perl 5's `grep` and `map` keywords.

There is a similar feature of placeholder parameters `{ $^a <=> $^b }` to
remove the specialness of Perl 5's `sort` keyword.

Another feature is pointy block, which removes the specialness of a `for` loop
iterator value syntax.

    
    
        # Perl 5 (this is the only place where this is valid)
        for my $line (<>) { say $line }
    
        # Perl 6
        for lines() -> $line { say $line }
    
        # not special
        lines().map( -> $line { say $line } );
    
        # really not special
        if $a.method-call -> $result { say $result }
    

\---

There is more to NativeCall that you haven't discovered yet.

For example, you can directly declare an external C function as a method in a
class, and expose it with a different name. (if the first parameter is the
instance)

Also it doesn't matter what you put in the code block for a NativeCall sub, as
long as it parses. That is why it doesn't matter if you put a Whatever star
(asterix) there or a stub-code ellipsis `...` in it. (you can also leave it
empty)

    
    
        use NativeCall;
        sub double ( --> size_t ) is native() is symbol<fork> { say 'Hello World' }
    
        say double;
        say '$*PID == ',$*PID;
        # 1555
        # 0
        # $*PID == 1552
        # $*PID == 1555
    

\---

Supplies __can __be pattern matched, just use `grep` on them as if they were a
list. It in turn returns a Supply. You can also call `map`, `first`, `head`,
and `tail` on them. Basically every List method is also on a Supply, along
with special methods like `delayed`.

\---

A lot about what you talked about with lists, and itemization is something
that does take some time to get used to. It does get easier, but is always
something you have to be cognizant of. Sort of like returning lists from
subroutines are from Perl 5. It allows control over flattening that isn't
available in Perl 5.

------
gfodor
Are there any good examples of projects like this that drag on for an eternity
and somehow, despite the odds, release, and also become extremely successful?
It seems like after a certain point you have basically missed the boat on
delivering value based on the assumptions you had when starting the project.

~~~
raiph
Do you consider Haskell to already be extremely successful? (Haskell planning
began in 1987, the same year Perl 1 shipped.)

------
pascalxus
Lately, I've been seeing more pots on Perl. Is it just confirmation bias? or
is Perl making a comeback?

~~~
throwaway7645
Perl did show back up in the TIOBE rankings as #10 and then #9 (Perl5). There
are plenty of blog posts and conferences...just not as much as Python, Java,
C#...etc. Perl6 is starting to get checked out by the first wave of people who
like to dive into new tech, so a bunch of blog posts have been showing up
recently.

------
floatboth
> Perl 6 has Perl’s regexes with a few changes: extending the Unicode support,
> moving the modifiers around, and reassigning some symbols, and also changing
> the whitespace rules to be more legible.

So… _Perl_ 6… has Perl-incompatible regular expressions?? Amazing.

~~~
Ultimatt
It also has all of the Perl 5 regex syntax too, so you can still use anything
legacy or if you prefer to stick to something more portable. It's just the
"default" regex is the new syntax. You can also put in any other "language"
for them that you feel like, so POSIX maybe shell glob? I think at least POSIX
probably exists in the ecosystem ;)

------
pavlov
This line from the article best summarizes it for me:

 _Perl 6: The Ruby on Rails of command-line tools._

------
nerdponx
As a general comment, I would love to see more "reviews" of programming
languages like this, even ones that are already in, use but maybe only in one
niche, or should perhaps be more popular than they are.

~~~
dom96
I thought the same thing. In particular I would love to hear what the author
has to say about the Nim programming language.

------
pvdebbe
This reads like a literary review. I like the style a lot!

------
_pmf_
How's the toolset on Windows? Last time I checked, there were no out-of-the-
box IDEs that supported debugging for Perl 6.

~~~
Ultimatt
There are some great things in Atom for linted editing with doc integration
[https://github.com/azawawi/atom-perl6-editor-
tools](https://github.com/azawawi/atom-perl6-editor-tools)

If you want to get hold of the latest stable full release you can use
chocolatey which is kept up to date
[https://chocolatey.org/packages/rakudostar](https://chocolatey.org/packages/rakudostar)
or use a .msi installer from the official Rakudo site.

~~~
_pmf_
Thank you; I'll be sure to try it out.

------
cafard
Excellent, thanks.

------
hzhou321
It is not a review. It is an introduction or tutorial.

