-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Labels
languageChanges to the Raku Programming LanguageChanges to the Raku Programming Language
Description
As again pointed out in rakudo/rakudo#2368.
If a method is sure to not be calling any other methods, then it should have the option of not automatically codegenning the *%_ in their signature. If that was done for the .head method, then this example would fail with a very useful error:
% raku -e 'my $n = 3; say (^10).head:$n'
Cannot resolve caller head(Range:D, :n(Int)); none of these signatures matches:
($head, +values)
as opposed to just silently do the wrong thing:
% raku -e 'my $n = 3; say (^10).head:$n'
0
because the :$n silently gets eaten, so it works as:
% raku -e 'my $n = 3; say (^10).head'
0
dontlaugh and librasteve
Metadata
Metadata
Assignees
Labels
languageChanges to the Raku Programming LanguageChanges to the Raku Programming Language