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
12
u/EsotericFox Apr 19 '20
Agreed, but that's a decision that must be weighed.
Do I need to expose this behavior? Would it be better to have these functions live elsewhere?
Depending on the answer, you may still very well have a solid argument for needing/using default arguments. And if you don't, you have a solid case for refactoring or redesign.