On Wed, 2008-07-02 at 14:08 +0100, Sam Liddicott wrote:
> * Jürg Billeter wrote, On 02/07/08 13:59: 
> > On Thu, 2008-05-15 at 02:28 -0300, Matías De la Puente wrote:
> >   
> > > vala, will include operators overload like in c#?
> > >     
> > 
> > We're not planning to support operator or method overloading, 
> are there non-technical reasons for avoiding method overloading?
> 
> I can see that where there is lots of type munging going on the
> concept of overloading can get confusing, but purely within vala it
> seems as if it ought not to be a problem, and as cname can be
> specified for external callers where needed, the C interface won't be
> lacking.

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.

Juerg

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

Reply via email to