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

1

u/be-sc Apr 19 '20

No need to appologize for anything. I gave a genuine answer.

Imo backwards compatibility is a major factor for C++’s overall success, so no, in general keeping it is not an error.

However, “legacy” features are not created equal. At this point I’d guess that goto has had its devestating reputation for so long that removing it from the language would lead to relatively minor disruption. At least compared to removing default function parameters – those’re used all over the place in both old and new code.