[Vala] Feature request: Syntactic sugar to map foo[index] to foo.get(index)
- From: Sandino Flores Moreno <tigrux gmail com>
- To: vala-list gnome org
- Subject: [Vala] Feature request: Syntactic sugar to map foo[index] to foo.get(index)
- Date: Mon, 1 Mar 2010 03:31:27 -0600
Hi.
I noticed that Vala allows with Gee sequences the next mapping:
array_list[index] ---> array_list.get(index)
However, shouldn't it be possible in non-gee objects?
Maybe introducing decorators would make it
easier, so classes with those decorators,
would allow such syntactic sugar.
For example:
[Array]
class MyList<T> {
[ItemGetter]
public T get_by_index(int index);
[ItemSetter]
public void set_by_index(int index, T data);
}
Hope it could be done in the near future.
Thanks.
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]