
| For my case, it means that the recently allocated new_key | replaces the old key that will have been around longer. | Doesn't this interact badly with generational collectors? I suppose it might, but I doubt its a significant effect, and the thought of having two versions doesn't appeal much! | Oh yes, and since the similar operations on Refs and states | are called modifyBlah, shouldn't the _C versions of | operations on FiniteMaps be called something with "modify" | in them? | | so addToFM_C would become modifyFM | addListToFM_C ----"--- listModifyFM | | etc. I think names with words rather than abbreviations are | easier to read when returning to something after a long | period of absence. I agree. Though "addTo" is hardly an abbreviation. Actually for finite maps etc, we've found "extendFM" to work nicely (better than addTo). Have a look at the nomenclature for (say) basicTypes/NameEnv.lhs in GHC's sources. Changing the names breaks programs, though. S

| so addToFM_C would become modifyFM | addListToFM_C ----"--- listModifyFM | | etc. I think names with words rather than abbreviations are | easier to read when returning to something after a long | period of absence.
I agree. Though "addTo" is hardly an abbreviation.
Um, I meant the "_C"
Actually for finite maps etc, we've found "extendFM" to work nicely (better than addTo). Have a look at the nomenclature for (say) basicTypes/NameEnv.lhs in GHC's sources.
Changing the names breaks programs, though.
Omelettes! And ghc has an option to deprecate things (I don't know about other compiler), so there's a straightforward upgrade path. Jón -- Jón Fairbairn Jon.Fairbairn@cl.cam.ac.uk
participants (2)
-
Jon Fairbairn
-
Simon Peyton-Jones