r/cpp • • Apr 19 '20

Default function arguments are the devil

https://quuxplusone.github.io/blog/2020/04/18/default-function-arguments-are-the-devil/
92 Upvotes

149 comments sorted by

View all comments

Show parent comment

2

u/jonathansharman Apr 19 '20

How is it more confusing than a one-argument function delegating to a three-argument function using default values (the alternative proposed in the blog post)?

0

u/bumblebritches57 Ocassionally Clang Apr 19 '20

Oh we could you know not hide any arguments at all.

Isn't that have the point of having functions use the same name with different parameters?

1

u/jonathansharman Apr 19 '20

The point of function overloading is not to hide arguments? I don't understand what you're saying.