New York: Apress, 2017. — 147 p.
Perl 6 is a programming language. It is designed to be easily learned, read, and written by humans, and is inspired by natural language. It allows the beginner to write in “baby Perl,” while giving the experienced programmer freedom of expression, from concise to poetic. Perl 6 is gradually typed. It mostly follows the paradigm of dynamically typed languages in that it accepts programs whose type safety it can’t guarantee during compilation. However, unlike many dynamic languages, it accepts and enforces type constraints. Where possible, the compiler uses type annotations to make decisions at compile time that would otherwise only be possible at runtime.
Many programming paradigms have influenced Perl 6. You can write imperative, object-oriented, and functional programs in Perl 6. Declarative programming is supported through features like multiple-dispatch, sub-typing, and the regex and grammar engine. Most lookups in Perl 6 are lexical, and the language avoids global state. This makes parallel and concurrent execution of programs easier, as does Perl 6’s focus on high-level concurrency primitives. When you don’t want to be limited to one CPU core, instead of thinking in terms of threads and locks, you tend to think about promises and message queues.
Perl 6 as a language is not opinionated about whether Perl 6 programs should be compiled or interpreted. Rakudo Perl 6 — the main implementation — precompiles modules on the fly and interprets scripts.