Only *@foo and *%foo are slurpy, as in "slurping up the rest of the arguments. 
But the term "variadic" refers to all optional arguments including named ones, 
so it would be incorrect to call those "slurpy", because they don't.  It's like 
the difference between * and ? in regex.

Larry

On Fri, 18 Aug 2017 07:10:52 -0700, comdog wrote:
> Consider this program which I don't expect to work (and it doesn't compile):
> 
>     sub show-the-arguments ( *@args, $i ) {
>         put "The arguments are @args[]";
>         }
> 
>     show-the-arguments( 1, 3, 7 );
> 
> The error message says "variadic":
> 
>     Cannot put required parameter $i after variadic parameters
> 
> But another sort of error uses a different term:
> 
>     sub show-the-arguments ( *@args, $i ) {
>         put "The arguments are @args[]";
>         }
> 
> This time the error messages say "slurpy":
> 
>     Only one slurpy positional allowed
> 
> The docs almost almost always say "slurpy" and the uses of "variadic"
> only appear as synonyms next to "slurpy":
> 
> * https://github.com/perl6/doc/search?utf8=✓&q=variadic&type=
> 
> * https://github.com/perl6/doc/search?utf8=✓&q=slurpy&type=

Reply via email to