A Review of Perl 6
<p><pre><code>    ｢Man is amazing, but he is not a masterpiece｣
</code></pre>
Is different than the other two, it can be thought of as short for<p><pre><code>    Q ｢Man is amazing, but he is not a masterpiece｣
</code></pre>
While the others are short for<p><pre><code>    qq “Man is amazing, but he is not a masterpiece”
</code></pre>
Which is short for<p><pre><code>    Q :qq “Man is amazing, but he is not a masterpiece”
    Q :double “Man is amazing, but he is not a masterpiece”
</code></pre>
Which is also short for<p><pre><code>    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”
</code></pre>
For more information see the [Quoting Constructs](<a href="https:&#x2F;&#x2F;docs.perl6.org&#x2F;language&#x2F;quoting" rel="nofollow">https:&#x2F;&#x2F;docs.perl6.org&#x2F;language&#x2F;quoting</a>) documentation.<p>---<p>There are modules for [debugging and tracing](<a href="https:&#x2F;&#x2F;github.com&#x2F;jnthn&#x2F;grammar-debugger" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;jnthn&#x2F;grammar-debugger</a>) Grammars.<p>A regex is just a special kind of method by the way.<p><pre><code>    say Regex.^mro;
    # ((Regex) (Method) (Routine) (Block) (Code) (Any) (Mu))
</code></pre>
Which is part of the reason it doesn&#x27;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.<p>---<p><pre><code>    # Perl 5
    &#x2F;(Male|Female) (?:[Cc][Aa][Tt]|[Dd][Oo][Gg])&#x2F;
    # is better written as
    &#x2F;(Male|Female) (?i:cat|dog)&#x2F;
</code></pre>
In Perl 6 you can turn on and off sigspace mode<p><pre><code>    &#x2F;:s (:!s Male | Female ) [:!s:i cat | dog ]&#x2F;
    # or fully spelled out
    &#x2F;:sigspace (:!sigspace Male | Female ) [:!sigspace :ignorecase cat | dog ]&#x2F;

    # or just use spaces more sparingly
    &#x2F;:s ( Male| Female) [:i cat| dog]&#x2F;
</code></pre>
Note that in this case it is more like<p><pre><code>    &#x2F;( Male | Female ) \s+ [:i cat | dog ]&#x2F;
</code></pre>
In other contexts it could be slightly different. Basically it ignores insignificant whitespace.<p>Note that `( a || b )` is more like the Perl 5 behaviour, but `( a | b )` tries both in parallel with longest literal match.<p>Regular expressions are also the reason `:35minutes` is in the language by the way<p><pre><code>    say &#x27;a ab abc&#x27; ~~ m:3rd&#x2F; \S+ &#x2F;;
    # ｢abc｣
</code></pre>
Rather than make it a special syntax, it was generalized so it can be used everywhere.<p>---<p>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.<p><pre><code>    $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( -&gt; $_ { .value } ); # ditto
</code></pre>
Note that the last asterix was part of an expression, while the others weren&#x27;t.<p><pre><code>    my &amp;shuffle = *.pick(*); # only the first * represents a parameter to the lambda
                             # the other is an argument to the pick method
</code></pre>
The main reason I think for its addition to the language is for indexing in an array<p><pre><code>    @a[ * - 1 ];
</code></pre>
Rather than make it a special syntax exclusively for index operations, it was made a general lambda creation syntax.<p>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.<p>---<p>A `$_` inside of `{ }` creates a bare block lambda, basically this removes the specialness of Perl 5&#x27;s `grep` and `map` keywords.<p>There is a similar feature of placeholder parameters `{ $^a &lt;=&gt; $^b }` to remove the specialness of Perl 5&#x27;s `sort` keyword.<p>Another feature is pointy block, which removes the specialness of a `for` loop iterator value syntax.<p><pre><code>    # Perl 5 (this is the only place where this is valid)
    for my $line (&lt;&gt;) { say $line }

    # Perl 6
    for lines() -&gt; $line { say $line }

    # not special
    lines().map( -&gt; $line { say $line } );

    # really not special
    if $a.method-call -&gt; $result { say $result }
</code></pre>
---<p>There is more to NativeCall that you haven&#x27;t discovered yet.<p>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)<p>Also it doesn&#x27;t matter what you put in the code block for a NativeCall sub, as long as it parses. That is why it doesn&#x27;t matter if you put a Whatever star (asterix) there or a stub-code ellipsis `...` in it. (you can also leave it empty)<p><pre><code>    use NativeCall;
    sub double ( --&gt; size_t ) is native() is symbol&lt;fork&gt; { say &#x27;Hello World&#x27; }

    say double;
    say &#x27;$*PID == &#x27;,$*PID;
    # 1555
    # 0
    # $*PID == 1552
    # $*PID == 1555
</code></pre>
---<p>Supplies <i></i>can<i></i> 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`.<p>---<p>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&#x27;t available in Perl 5.