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

Proposal request: ignored arguments #454

Closed
dbkaplun opened this Issue Mar 4, 2016 · 1 comment

Comments

Projects
None yet
3 participants
@dbkaplun

dbkaplun commented Mar 4, 2016

I'd like to gauge the feasibility of a new feature, akin to ignored values in array destructuring:

function ignoredArgument (foo,,baz) {
  return foo+baz;
}
console.log(ignoredArgument(1,2,3) === 4);

Which could replace this common idiom, alleviating the need for an unused variable:

function ignoredArgument (foo,_,baz) {
  return foo+baz;
}
console.log(ignoredArgument(1,2,3) === 4);

Does this feature make sense? Am I missing anything?

See also: https://esdiscuss.org/topic/proposal-ignored-arguments

@UltCombo

This comment has been minimized.

Show comment
Hide comment
@UltCombo

UltCombo Mar 4, 2016

Contributor

Please post these to the ES Discuss mailing list. It is the proper place for this kind of discussion, and you will get a far broader audience.

Contributor

UltCombo commented Mar 4, 2016

Please post these to the ES Discuss mailing list. It is the proper place for this kind of discussion, and you will get a far broader audience.

@bterlson bterlson closed this Mar 4, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment