Proposal: Rename HashMap.lookupDefault to HashMap.findWithDefault
Matt Renaud
matt at m-renaud.com
Wed Jan 24 15:59:49 UTC 2018
> keep the function until the next larger API overhaul or say, for five
years or a decade.
That sounds good to me, I wasn't sure how long is reasonable to wait after
deprecating an API before removing it.
On Wed, Jan 24, 2018 at 6:25 AM, Andreas Abel <andreas.abel at ifi.lmu.de>
wrote:
> > I'd say 1 year is too short. There is no need to remove the function
> > quickly. I'd vote for adding a deprecation warning soon, but then keep
> > the function until the next larger API overhaul or say, for five years
> > or a decade.
>
> +1.
>
> Yes.
>
>
> On 24.01.2018 08:11, Henning Thielemann wrote:
>
>>
>> On Tue, 23 Jan 2018, Matt Renaud wrote:
>>
>> Cons:
>>> -----
>>>
>>> - API change requires users to update their code
>>> + unordered-containers has A LOT of users: 358815 total (13325 in the
>>> last 30 days)
>>>
>>
>> A better measure are certainly the reverse package dependencies:
>> https://www.stackage.org/package/unordered-containers
>>
>> There are almost 1000 packages that import unordered-containers, still
>> quite a lot!
>>
>> Migration - Option 1:
>>> ---------------------
>>>
>>> - Announce on Haskell communication channels (haskell-cafe@,
>>> haskell-community@, #haskell on Twitter, Reddit
>>> thread, etc.)
>>> - Users of unordered-containers >= 0.2.9.0 receive warning about
>>> deprecated function
>>> - Code can be updated by find and replace: s/lookupDefault/findWithDefaul
>>> t/
>>> - lookupDefault with deprecation notice remains for 1 year (subject to
>>> change)
>>> - after 1 year the lookupDefault function is removed,
>>> unordered-containers version bumped to 0.3.0.0 (major
>>> version bump due to breaking change)
>>>
>>
>> I'd say 1 year is too short. There is no need to remove the function
>> quickly. I'd vote for adding a deprecation warning soon, but then keep the
>> function until the next larger API overhaul or say, for five years or a
>> decade.
>>
>>
>> _______________________________________________
>> Libraries mailing list
>> Libraries at haskell.org
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>>
>>
>
> --
> Andreas Abel <>< Du bist der geliebte Mensch.
>
> Department of Computer Science and Engineering
> Chalmers and Gothenburg University, Sweden
>
> andreas.abel at gu.se
> http://www.cse.chalmers.se/~abela/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20180124/957230c2/attachment.html>
More information about the Libraries
mailing list