Raku
A powerful, expressive programming language from the Perl family, designed for elegance and concurrency with gradual typing and extensive Unicode support.
Created by Larry Wall and the Raku community
Raku (formerly known as Perl 6) is a member of the Perl family of programming languages that took a bold step: rather than incrementally evolving Perl 5, the community designed a completely new language from first principles while keeping the spirit of Perl. The result is one of the most feature-rich and expressive languages ever created.
History & Origins
In 2000, at the Perl Conference, Larry Wall announced that Perl 6 would be a complete redesign rather than an incremental update. The community threw out everything and started fresh, incorporating lessons learned from Perl 5 and ideas from languages like Haskell, Ruby, and Smalltalk.
The development took 15 years—far longer than anyone expected. During this time:
- 2004: Audrey Tang created Pugs, the first working implementation in Haskell
- 2010: Rakudo Star emerged as the primary implementation on the MoarVM virtual machine
- 2015: Version 6.c (Christmas) was officially released
- 2019: Renamed to “Raku” (using the
~sigil as its logo) to clarify it’s a sister language, not a replacement for Perl 5
The Name “Raku”
“Raku” comes from the Japanese word 楽 meaning “ease” or “comfort”, reflecting the language’s goal of programmer happiness. It also references “Rakudo” (the main compiler) and maintains a connection to Perl through shared etymology.
Key Features
Gradual Typing
Raku lets you choose your typing discipline—fully dynamic, fully static, or anywhere in between:
| |
Powerful Grammars
Raku elevates regular expressions to a complete parsing system called grammars:
| |
Grammars can parse anything from simple patterns to complete programming languages.
Unicode-First Design
Raku has comprehensive Unicode support built into the language core:
| |
Built-in Concurrency
Raku has native support for concurrent and parallel programming:
| |
Junctions (Quantum Superpositions)
One of Raku’s most unique features—values that are multiple things at once:
| |
Raku vs. Perl 5
| Feature | Perl 5 | Raku |
|---|---|---|
| Release | 1994 | 2015 |
| Typing | Dynamic only | Gradual |
| Objects | Bolted on | Native, with roles |
| Concurrency | Threads/modules | Built-in promises, channels |
| Regex | Powerful | Grammars (even more powerful) |
| Unicode | Partial | First-class everywhere |
| Sigils | Type-based | Container-based |
| Compatibility | Backward compatible | New language |
The Sigil System
Raku’s sigils indicate the container type, not the value type:
| |
Object-Oriented Programming
Raku has a sophisticated built-in object system:
| |
Why Raku Today?
Raku excels in specific domains:
- Text Processing: Grammars are the most powerful parsing tool in any mainstream language
- Prototyping: Try ideas quickly with gradual typing
- Concurrency: Built-in async primitives simplify parallel code
- Language Experimentation: Explore advanced programming concepts
- Unicode-Heavy Tasks: First-class support for international text
Trade-offs
- Startup time can be slow compared to interpreted languages
- Smaller ecosystem than Perl 5’s CPAN (though growing)
- Learning curve is steep due to rich feature set
- Fewer jobs specifically requiring Raku
The Perl Family Today
Perl 5 and Raku coexist as sister languages:
- Perl 5: Mature, stable, huge ecosystem (CPAN), excellent for system administration and text processing
- Raku: Modern design, powerful features, growing ecosystem, excellent for parsing and concurrent programming
Both are actively developed, and skills transfer between them.
Getting Started
Raku is available through:
- Rakudo Star: The recommended distribution including popular modules
- Docker: Official
rakudo-starimage for containerized development - Package managers: Available on most Linux distributions
The community is welcoming, and resources include:
- docs.raku.org - Official documentation
- raku.org - Main website
- IRC and Discord channels for real-time help
Raku represents one of the most ambitious language design efforts in programming history. Whether or not it becomes widely adopted, it has pushed the boundaries of what programming languages can do.
Timeline
Notable Uses & Legacy
Text Processing
Raku's powerful grammars make it exceptional for parsing complex text formats and DSLs.
Concurrent Programming
Built-in promises, channels, and supplies enable elegant reactive and parallel programming.
Prototyping
Gradual typing and flexible syntax make Raku ideal for rapid prototyping and exploration.
Educational
Used in programming language courses to demonstrate advanced language features and design.
Bioinformatics
BioRaku provides modules for biological sequence analysis, continuing Perl's genomics legacy.
Language Influence
Influenced By
Influenced
Running Today
Run examples using the official Docker image:
docker pull rakudo-star:alpineExample usage:
docker run --rm -v $(pwd):/app -w /app rakudo-star:alpine raku hello.raku