Randal L. Schwartz
1 min readNov 10, 2017

--

My co-worker observed these are all in Perl 6 already:

#1: The pipeline operator is `==>`.

#2: Pattern matching is handled with `given`/`when` or via multi-dispatch routines.

#3: Reactive programming is handled by Supply objects, usually using the `react`/`whenever` or `supply`/`whenever` keywords.

#4: Implicit naming comes in two flavors, invisible and visible; the implied `$_` can usually be omitted (e.g., `@foo.map({ .uc })`) or declared using the carrot twigil (e.g., `@foo.map({ $^it.uc })`) with any name you prefer.

#5: Destructuring is either handled with list flattening or captures, depending on the context.

#6: The cascade operator does not exist, but you can achieve something similar using the `with` keyword, `with $qs { .text = ‘x’; .classes.add(‘y’) }`.

#7: Basically any statement can be used in an expression so long as it is prefixed with `do` or `gather` and possibly keywords.

#8: The `try` keyword works as an expression in Perl 6.

#9: The `.assuming()` method on functions returns a curried version of a routine, which can also be used to perform early binding of named arguments as well.

#10: Method extensions are perfomed with the `augment` keyword. (edited)

--

--

Randal L. Schwartz

FLOSS Weekly host, Perl/Dart/Flutter consultant/trainer/author, fun guy (but not fungi)