Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Variadic" or "slurpy"? #6451

Closed
p6rt opened this issue Aug 18, 2017 · 5 comments
Closed

"Variadic" or "slurpy"? #6451

p6rt opened this issue Aug 18, 2017 · 5 comments
Assignees
Labels
docs Anything documentation-related LTA Less Than Awesome; typically an error message that could be better

Comments

@p6rt
Copy link

p6rt commented Aug 18, 2017

Migrated from rt.perl.org#131922 (status was 'open')

Searchable as RT131922$

@p6rt
Copy link
Author

p6rt commented Aug 18, 2017

From @briandfoy

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=

@p6rt
Copy link
Author

p6rt commented Aug 18, 2017

From @AlexDaniel

This could've been a LHF, except for these tests​: https://github.com/perl6/roast/blob/4bfd6d2374cb4ea1b8fa057a5f294b988e4dec44/S32-exceptions/misc.t#L180-L185

 ¯\_(ツ)_/¯

But yes, I think it should say “slurpy” everywhere.

On 2017-08-18 07​:10​:52, 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=

@p6rt
Copy link
Author

p6rt commented Aug 18, 2017

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Aug 18, 2017

From @TimToady

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=

@p6rt
Copy link
Author

p6rt commented Aug 18, 2017

From @briandfoy

Several areas of the docs then need to correct that. No matter what you
decide, a user should be able to take the tricky words in an error message
and usefully find them in the docs.

--
brian d foy <brian.d.foy@​gmail.com>
http://www.pair.com/~comdog/

@p6rt p6rt added the LTA Less Than Awesome; typically an error message that could be better label Jan 5, 2020
@JJ JJ added the docs Anything documentation-related label Dec 29, 2020
@JJ JJ self-assigned this Dec 29, 2020
JJ added a commit to Raku/doc that referenced this issue Dec 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Anything documentation-related LTA Less Than Awesome; typically an error message that could be better
Projects
None yet
Development

No branches or pull requests

2 participants