Re: [Vala] Methods/ctors overloading



Andrés G. Aragoneses wrote:
Hello. I'm wondering if the difference between Vala and C# wrt
method/ctor overloading is intentional or is its real support planned in
the future? I ask this because I think it's a really important feature.
If not planned, I'd like to know if there would be interest in accepting
patched for it.

Thanks,

      Andres


It's intentional. Keep in mind that compiled Vala class libraries are
intended to be usable C class libraries as well. For example, function
names like

 my_class_new
 my_class_new_with_foo
 my_class_new_from_bar

are more self-explaining than

 my_class_new0
 my_class_new1
 my_class_new2

I don't think that method/constructor overloading is an important
feature. It adds no additional value for the programmer. The only
drawback is that the programmer has to be more creative with respect to
method/constructor naming. And with clear naming it's more obvious which
method will be called than with method overloading.


Best regards,

Frederik



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]