Re: [Vala] [Libgee][RFC] Making Map<K, V> a Collection<Map.Entry<K, V> - Was: Libgee's Roadmap proposal



2009/7/23 Didier "Ptitjes" <ptitjes free fr>:

So here is the proposal:

- Renaming Map.remove(K key) in Map.unset(K key)

I don't know about that.. it would be kinda unobvious. People coming
from C# and Java will be confused.
I'm not sure whether Vala supports it, but in C#, you could do
something like this:

class Klass: Interface
{
     public void method () {}
     void Interface.method () {}
}

Now the two methods would not be overloads, but the explicitly
qualified one would be callable via casting to Interface.
Since Vala doesn't support overloading, it may be interesting to
explore possibility to solve remove() this way.

- Renaming Map.contains(K key) in Map.has(K key)

Why not add contains_key() and contains_value() methods?


- Make Map<K, V> inherit from Collection<Map.Entry<K, V>>

Please comment and argue ;)


Yes, sir! :-P

Best regards, Didier.



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