in reply to Re^3: Function overloading in perl
in thread Function overloading in perl

If your language says that foo(bar, baz) is defined but foo(bar) is not, then you're unlikely to win the argument with your language. Sometimes you have to work within the rules, not make them.

(Googles.)

My initial response was not quite right, you can have optional arguments in C++ after all. But you can't in Java because the language doesn't support having optional arguments. There to get the same effect you really do have to do function overloading. The overloaded function is pretty easy to write (it just calls foo(bar, baz) with a default value supplied), but you still need to write it.