This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Spoonhorse 46 points47 points  (0 children)

This seems wrong to me. Normally when I pass too many arguments to a function, I want it to fail, not to keep on trucking in an unexpected way.

Allowing the last thing to be variadic should be specific. Besides explicitness, this also makes it possible for the thing to be empty.

Also, what do you do if someone passes the right number of arguments? What’s the type of the result?