Unicode variable names
Raku is written in Unicode so, with narrow restrictions, nearly any Unicode letter can be used in identifiers.
See the current Raku documentation on the topic here: https://docs.raku.org/language/syntax#Identifiers
my $Δ = 1;
$Δ++;
say $Δ;
Function and subroutine names can also use Unicode characters: (as can methods, classes, packages, whatever...)
my @ᐁ = (0, 45, 60, 90);
sub π { pi };
sub postfix:<°>($degrees) { $degrees * π / 180 };
for @ᐁ -> $ಠ_ಠ { say sin $ಠ_ಠ° };
sub c͓͈̃͂̋̈̆̽h̥̪͕ͣ͛̊aͨͣ̍͞ơ̱͔̖͖̑̽ș̻̥ͬ̃̈ͩ { 'HE COMES' }
See Also:
Last updated
Was this helpful?