[Vala] Delegation in vala



Can you add one really necessary feature to Vala: delegation?

It would be great if I could write something like this:

================================
 class A : Object {
public void foo() {
stdout.printf("Object A doing the job.");
}
};
class B : Object {
public delegation A a;
};

================================
instead of this:
================================
 class A : Object {
public void foo() {
stdout.printf("Object A doing the job.");
}
};
class B : Object {
   public A a;
public void foo() {
a.foo();
}
};

================================
If there are lots of objects to delegate, there will be LOTS of unnecessary code with proxy methods.
And when I add/remove method from A, I need to change all B-like classes manually :(


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