Status of nubOrd (Proposal #2629)
dave at zednenem.com
Mon Oct 6 00:07:00 EDT 2008
On Sat, Oct 4, 2008 at 3:26 AM, Bart Massey <bart at cs.pdx.edu> wrote:
> I need to know what the community wants me to do to close
> out my proposal to add nubOrd to the standard libraries.
> After ruling out a lot of marginal choices, I guess I see
> three leading alternatives, all of which have negatives.
> I'd love to have some feedback on these so I can start
> thinking about other things.
I realize I'm coming into this discussion late, but has anyone
surveyed existing Haskell code to see how often nub is used? How many
of those cases require the specific functionality of nub, as opposed
to something like "Set.toList . Set.fromList"? I may be misjudging
things, but I can't imagine it's often enough to justify three or more
implementations in the standard library.
If there are really a lot of cases where people need a collection that
(1) has no duplicates, and (2) preserves an arbitrary order of
elements, maybe we'd be better off designing a data structure
specifically for that.
Dave Menendez <dave at zednenem.com>
More information about the Libraries