Implementing operators
Submitted by Johannes Schmid
Link to original bug (#518604)
Description
(This is more or less what Jürg, Raffaele and me discussed while taking a bus from FOSDEM to the hotel)
Sometimes it is really convenient to overwrite mathematical operators likes it is done in C++. Also the operators "=" and "==" can save quite a couple of code and make it more readable.
The idea is to create special interfaces that automaticly map certain method names on operators:
public interface Vala.Compare { public abstract compare(Vala.Compare other); }
which would then map to the operator "==" and of course both objects have to be of the same type to be compared.
Of course this is for Vala 2.x!