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/
90 Upvotes

149 comments sorted by

View all comments

Show parent comment

2

u/pantong51 Apr 19 '20

I think it can be a balance, if I find my self wanting defaults ill debate on refactoring the arguments into a struct(if more than 3 args) and setting defaults there. While that sounds fine I'm not sure if its a good solution.