updateLookupWithKey bug? Was: Data.Map,
Data.IntMap documentation (1611)
Christian Maeder
Christian.Maeder at dfki.de
Mon Nov 26 09:39:37 EST 2007
Iavor Diatchki wrote:
> On Nov 21, 2007 7:34 PM, Andriy Palamarchuk <apa3a at yahoo.com> wrote:
>> Because there was no consensus about how to resolve
>> the problem I ended up leaving
>> Data.IntMap.updateLookupWithKey implementation as is
>> and adding a documentation that its behavior differs
>> from Data.Map.updateLookupWithKey.
>> Also, this is the least disruptive alternative.
>
> I think that we should fix this: Data.IntMap should be a more
> efficient implementation of Data.Map, for the special case when the
> keys are Ints. The methods should not behave differently. No one
> seemed to disagree with the behavior that Christian (and also I)
> suggested, namely, to return the old value, so why don't we jsut make
> both implementations do that?
It seems, nobody wants to take the responsibility for changing the
implementation (or overtake maintainership for any collection types).
(Another suggestion was deprecation, but correcting it as we suggested
would be more in the spirit of Daan, who initially designed DData.)
Just a further note to:
"Data.IntMap should be a more efficient implementation of Data.Map"
This is currently not the case (at least) for the "size" function.
Christian
More information about the Libraries
mailing list