
Andriy Palamarchuk wrote:
Adrian, question whether to deprecate updateLookupWithKey is worth discussing, but we need to fix the function anyway.
I would say just document the code as it is, warts and all. Don't change the functions because maybe someone is using them (though I suspect this is not the case). But also add a DEPRECATE pragma to discourage further use. Maybe do this for both IntMap and Map, because even if they were consistent, I don't think they're very useful. An API that clearly separates the process of searching for the key from whatever you want to do when it's found (or not) is so much more flexible and easy to understand IMHO. BTW, the way I did this should also work for IntMap tries too AFAICT, but I'm not sure it would offer any performance advantage over a repeated lookup in this case. So maybe keep them for IntMap? My 2p.. Regards -- Adrian Hey