[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [Vala] Set implementation and/or associative arrays
- From: Jürg Billeter <j bitron ch>
- To: Alessandro Pellizzari <alex amiran it>
- Cc: Vala ML <vala-list gnome org>
- Subject: Re: [Vala] Set implementation and/or associative arrays
- Date: Tue, 22 Jan 2008 16:00:56 +0100
Hi,
On Tue, 2008-01-22 at 13:38 +0100, Alessandro Pellizzari wrote:
> I don't want to have to instantiate it like this:
>
> r = new Row<string,string>();
>
> So I tried to have them "implicit".
> Looking through vala and gee sources I understood that I can do it
> implementing Gee.Map interface, so I tried this:
[...]
> But I get the following error (beside the "does not implement interface
> method" ones):
>
> error: Return type and/or parameters of overriding method `Row.get' do
> not match overridden method `Gee.Map.get'.
>
> I think it's because I should implement it as "public V get(K key)", but
> this would lead me to declare "public class Row<K,V>: Object,Map<K,V>"
> making the types explicit.
It's a limitation of the current generics support. I hope to get it
fixed soon. Can you please file a bug in Bugzilla?
> And could we have "magic methods" without implementing interfaces
> (__set(), __get(), __toString(), __call(), etc as in PHP/Pyhton/D)? :)
The interface approach makes more sense for Vala and GObject/C, in my
opinion.
Jürg
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]