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/qoning Apr 22 '20

Don't need to save it anywhere, whatever named parameters you use are matched against the declaration that you just wrote

export void func(int myParam1, float myParam2);

If some other programmer somewhere has your library compiled but chooses to change the names in his declaration (his copy of .h), that's up to him. Calls to the function are still positional.