Linux, macOS, Windows, Docker
Multi Paradigm
Smoothly combine coding styles:
- Object-Oriented:
class Circleencapsulates data and behavior. - Functional: built-ins like
.mapand operators like».and[+]. - Declarative:
...infers sequences, such as the powers of two. - Procedural: the overall code flow is straightforward.
...natural syntax & semantics
class Circle {
has $.radius;
method area { π * $.radius² }
}my @radii = 1,2,4...256;
my @circles = map { Circle.new(:$^radius) }, @radii;
my $total-area = [+] @circles».area;
say "Total area: $total-area";
Grammars
Definable grammars for pattern matching and generalized string processing.
...domain specific languages
grammar Parser {
rule TOP { I <love> <lang> }
token love { '♥' | love }
token lang { < Raku Rust Go Python Ruby TypeScript PHP > }
}say Parser.parse: 'I ♥ Raku';
say Parser.parse: 'I love Python';
Unicode Regexes
The most powerful Unicode-aware regular expression engine available, especially for complex text processing.
It shines in tasks where precision and multilingual support are essential such as Grapheme and Diacritic handling.
...unicode centric text handling
say "Cool😎" ~~ /<:Letter>* <:Block("Emoticons")>/; say "Cześć" ~~ m:ignoremark/ Czesc /; say "WEIẞE" ~~ m:ignorecase/ weisse /; say "หนูแฮมสเตอร์" ~~ /<:Letter>+/;
Localization & Internationalization
This snippet is written using Japanese identifiers and strings, showcasing localization (L10N) and internationalization (I18N) features.
Localized Raku code can be automatically translated to any other localization.
...think global: act local
私の $数 = プロンプト "数を教えてください ";
言う "数は{$数}です。";もしも $数 <= 10 {
言う "数は10以下です";
} その他 {
言う "数は10以上です";
}
Linux, macOS, Windows, Docker










