An option to state "we take more arguments but we ignore them" #49

Closed
schwern opened this Issue Aug 16, 2012 · 3 comments

Comments

Projects
None yet
3 participants
Contributor

schwern commented Aug 16, 2012

@barefootcoder does bring up an important issue in his blog post with his around example: sometimes people will add more arguments to your method. If these are named arguments (ie. not positional and optional) then they're probably safe to ignore. Right now he's using (@_) to cover that, but that only works if your method takes no other arguments.

Do we need an option which ways "ignore further named arguments"?

ap commented Aug 17, 2012

Isn’t that already handled by adding a trailing slurpy array argument?

Contributor

schwern commented Aug 17, 2012

I thought of that, but positionals can't come after named arguments. Even if they could, I have issues with that: 1) its not declaring the intent and 2) its copying all the extra arguments just to throw them out.

Contributor

barefootcoder commented Dec 2, 2012

Fixed in version 20121201. We'll be using the "yadda yadda" syntax for this (i.e. ...).

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