Re: [Vala] Support for method overloading.

Fabzter píše v Čt 07. 01. 2010 v 16:01 -0600:
Hi. I have been playing with Vala for some months. I find it to be a really
cool language, thus, I'm thinking in porting an medium sized personal
project from C# to Vala, but it relies heavyly on method and constructor
overloading, and having this features in Vala would make my refactoring work
minimal, so I want to know if vala will ever support this features, you
know, so I can start waiting if they are planned. :)

Short story:

Long story:
 Vala translates to C, which doesn't support overloading. That means any
overloading in Vala would mean mangling names of methods in C, which
would go against one of the most significant advantages of Vala - being
able to use Vala library the same way as if it was written in C. The
same goes for constructors, you just need to come up with some nice
names. It is also my honest belief that overloading is evil and makes
programmer's work harder.

Side note:
 Be careful with constructors, they work a bit differently in Vala, than
they do in C#.
Side note 2:
 Keep in mind that refcounting behaves very differently from C#'s
garbage collecting. You have greater control, but also greater
Side note 3:
 Those side notes are probably not necessary, but I'm writing them just
in case. :)

Attachment: signature.asc
Description: Toto je digitálně podepsaná část zprávy

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