Chapter 8 of 9
Conclusion
N.B. This material was collected and structured automatically, and may contain unintentional mistakes. Every claim links its source: please check it before relying on a detail.
Perl 6's specification chose several answers the industry later settled on, five to twenty years early:
| Year | Perl 6's choice |
|---|---|
| 2001 | The closing-delimiter heredoc rule, and defined-or |
| 2002 | Success and failure scope blocks, /x by default, and grammars as classes |
| 2003 | Named-only parameters |
Those choices rarely turned into citations. Ideas travel with implementations people can ship, and with the languages designers already use.
What crossed
What crossed, in five documented borrowings and in Perl 5's many, was small, separable syntax or semantics that a host language could adopt on its own:
- an arrow token;
- a heredoc margin rule, which shipped intact in Swift and is credited in the swift-evolution thread;
- a string-increment rule;
- a regex whitespace default;
- a CPAN object system;
- below the language level, a lookbehind technique and a separator modifier.
What is still Raku's own
The features that need a whole-language commitment have not moved: junction autothreading, hyper- and meta-operators, Whatever-currying, NFG, grammar subclassing and slangs. They show how much of Raku is architecture, not syntax.
Lessons for an implementer
- Use the right date. The Apocalypse establishes the idea. Pugs (2005) and Rakudo (2009–2015) decide whether anyone outside could have used it. Later-specified features such as
:D, NFG and Supplies were contemporaries of their analogues, not ancestors. Evensub MAIN, specified four years before plac, became fully usable the month plac appeared. - Borrow settled designs. Perl 5's smartmatch froze a 2002–2007 snapshot of a design that Raku then revised. Larry Wall apologised for the mismatch within weeks of 5.10.0, and Perl 5 has carried the result for eighteen years.
- Settled, separable pieces travel. The parts of Raku now cited in PHP, Ruby, Swift, C#, Carbon and TC39 discussions are range endpoints, rational defaults, chained comparison and regex ergonomics. Stable, well-documented semantics for such pieces are what other languages are likely to keep picking up.