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

2009/7/24 Ali Sabil <ali sabil gmail com>:
On Thu, Jul 23, 2009 at 10:32 AM, Didier "Ptitjes"<ptitjes free fr> wrote:

Please comment and argue ;)

Could you please explain the rationale behind this change ? What would
be the benefit from  turning a Map into a collection of Pair ?

Efficient iteration over all the Map's elements. Otherwise you'd have
to retrieve a collection of keys and lookup corresponding value for
every single one of them.

what is the exact benefit from deviating from what other widespread
class libraries use for their containers ?

Define "widespread class libraries" and "deviation". If you mean Map
becoming Collection, .NET framework uses this approach for years and I
don't hear anyone complaining.

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