* Jürg Billeter wrote, On 02/07/08 14:19:
>
> There are many cases where method overloading makes code harder to read,
> as each method can do something completely different, and you have to
> look carefully at each argument type to recognize what exact method will
> be called. This is especially bad if the overloaded methods also use
> default arguments.
>
> There are certainly also legitimate use cases of method overloading,
> however, adding an additional word to the method name is seldom a
> problem and usually makes the code more, not less, readable. I consider
> code readability a very important aspect.
>   

(I realise that you may not want to draw out this discussion, that's OK)

One of my problems is trying to think of different names for a set of
functions which essentially do the same thing but with different
arguments types

I agree that default arguments can make some if this need go away, and
sometimes too at the expense of readability, - trying to remember which
groups of arguments can be defaulted out together when calling and in
the method body trying to seperate out the default arguments to try to
work out what the caller was actually asking.

anyway....

Sam


_______________________________________________
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to