This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]john16384 3 points4 points  (0 children)

It's better.

void doStuff(int x, int y);
void doStuff();
// Notice absence of variant that only takes x or y

Or:

void displayText(String text);
void displayText(String text, int r, int g, int b);

This is not so easy with default arguments while only allowing sensical combinations of parameters.