[Vala] operators overload



hi again,

vala, will include operators overload like in c#?

example:

static public Vector operator+ (Vector v1, Vector v2)
{
    return new Vector (v1.x+v2.x, v1.y+v2.y);
}

...
...

Vector a = new Vector(3, 2);
Vector b = new Vector(4, 6);
Vector c;

c = a +b;

Matias


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