r/cpp • u/anonymous23874 • 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
r/cpp • u/anonymous23874 • Apr 19 '20
View all comments
Show parent comment
0
u/NotMyRealNameObv Apr 20 '20
Rarely have I seen a good reason for multiple input arguments of the same type. Most of the time, it should be one aggregate (e.g. one
Positionargument instead ofint x, int y, or it should just be different types (e.g. if the function takes multiple bools).