Re: [Vala] [Libgee][RFC] Making Map a Collection - Was: Libgee's Roadmap proposal

2009-07-24 Thread Jiří Zárevúcky
2009/7/24 Fredderic : > On Fri, 24 Jul 2009 02:21:14 +0200, > Jiří Zárevúcky wrote: > >> 2009/7/24 Ali Sabil : >>> On Thu, Jul 23, 2009 at 10:32 AM, Didier "Ptitjes" Please comment and argue ;) >>> Could you please explain the rationale behind this change ? What >>> would be the benefit from

Re: [Vala] [Libgee][RFC] Making Map a Collection - Was: Libgee's Roadmap proposal

2009-07-24 Thread Fredderic
On Fri, 24 Jul 2009 02:21:14 +0200, Jiří Zárevúcky wrote: > 2009/7/24 Ali Sabil : >> On Thu, Jul 23, 2009 at 10:32 AM, Didier "Ptitjes" >>> Please comment and argue ;) >> Could you please explain the rationale behind this change ? What >> would be the benefit from  turning a Map into a collectio

Re: [Vala] [Libgee][RFC] Making Map a Collection - Was: Libgee's Roadmap proposal

2009-07-23 Thread Jiří Zárevúcky
2009/7/24 Ali Sabil : > On Thu, Jul 23, 2009 at 10:32 AM, Didier "Ptitjes" 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 ele

Re: [Vala] [Libgee][RFC] Making Map a Collection - Was: Libgee's Roadmap proposal

2009-07-23 Thread Ali Sabil
On Thu, Jul 23, 2009 at 10:32 AM, Didier "Ptitjes" wrote: > Hi list, > > I thought a lot about that and I'd like to make the following proposal. > > Levi Bard wrote: >> Why not rename some of the Map methods (contains => contains_key, >> remove => remove_key) and then map the Collection methods as-

Re: [Vala] [Libgee][RFC] Making Map a Collection - Was: Libgee's Roadmap proposal

2009-07-23 Thread Jiří Zárevúcky
2009/7/24 Didier "Ptitjes" : > Levi Bard wrote: >>> - Renaming Map.remove(K key) in Map.unset(K key) >>> - Renaming Map.contains(K key) in Map.has(K key) >>> - Make Map inherit from Collection> >> >> I like unset. "has" is not different enough from "contains" for my >> liking - I can see it being a

Re: [Vala] [Libgee][RFC] Making Map a Collection - Was: Libgee's Roadmap proposal

2009-07-23 Thread Didier "Ptitjes"
Levi Bard wrote: >> - Renaming Map.remove(K key) in Map.unset(K key) >> - Renaming Map.contains(K key) in Map.has(K key) >> - Make Map inherit from Collection> > > I like unset. "has" is not different enough from "contains" for my > liking - I can see it being a source of future confusion ("What's

Re: [Vala] [Libgee][RFC] Making Map a Collection - Was: Libgee's Roadmap proposal

2009-07-23 Thread Quikee
To create a more clear picture how the new Map interface could look like I have created a page on the wiki: http://live.gnome.org/Libgee/NewMapInterfaceProposal Modify it freely with own proposal or if there are any typos (which they probably are). Regards, Tomaž

Re: [Vala] [Libgee][RFC] Making Map a Collection - Was: Libgee's Roadmap proposal

2009-07-23 Thread Levi Bard
> - Renaming Map.remove(K key) in Map.unset(K key) > - Renaming Map.contains(K key) in Map.has(K key) > - Make Map inherit from Collection> I like unset. "has" is not different enough from "contains" for my liking - I can see it being a source of future confusion ("What's the difference between co

Re: [Vala] [Libgee][RFC] Making Map a Collection - Was: Libgee's Roadmap proposal

2009-07-23 Thread Jiří Zárevúcky
2009/7/23 Didier "Ptitjes" : > > 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:

Re: [Vala] [Libgee][RFC] Making Map a Collection - Was: Libgee's Roadmap proposal

2009-07-23 Thread Quikee
On Thu, Jul 23, 2009 at 11:59 AM, Didier "Ptitjes" wrote: > Quikee wrote: >> I agree with the proposal but I have already tried to implement a >> similar thing like this and every time I tried I had a problem with >> iterators get method (I think I have reported this issue in bugzilla >> but this m

Re: [Vala] [Libgee][RFC] Making Map a Collection - Was: Libgee's Roadmap proposal

2009-07-23 Thread Didier "Ptitjes"
Quikee wrote: > I agree with the proposal but I have already tried to implement a > similar thing like this and every time I tried I had a problem with > iterators get method (I think I have reported this issue in bugzilla > but this might be some time ago). The first thing I would do is to > imple

Re: [Vala] [Libgee][RFC] Making Map a Collection - Was: Libgee's Roadmap proposal

2009-07-23 Thread Quikee
Hi, I agree with the proposal but I have already tried to implement a similar thing like this and every time I tried I had a problem with iterators get method (I think I have reported this issue in bugzilla but this might be some time ago). The first thing I would do is to implement an quick examp

[Vala] [Libgee][RFC] Making Map a Collection - Was: Libgee's Roadmap proposal

2009-07-23 Thread Didier "Ptitjes"
Hi list, I thought a lot about that and I'd like to make the following proposal. Levi Bard wrote: > Why not rename some of the Map methods (contains => contains_key, > remove => remove_key) and then map the Collection methods as-is with G > == Pair? First my proposal will break the API. Libgee b