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
6
u/whattapancake Apr 19 '20
I vaguely remember a similar discussion about goto taking place a while back on this sub. My personal take on goto is that C++ has enough good and clear flow control that goto is largely unneeded - that is to say, any use of goto can be subverted by better code structuring or otherwise refactoring. One might argue a similar case against default arguments, but in their case I personally feel that the alternatives are clunkier and contrived. Again, all in moderation!