[Haskell-cafe] ordNub

Yitzchak Gale gale at sefer.org
Fri Oct 18 20:11:21 UTC 2013


David Thomas wrote:
> With such a big speedup and not a lot of downside

That is far from proven, and frankly, almost certainly untrue.

But again, it isn't the point here. There *are* case where you
do need nubOrd, and those cases are common enough for
it to make sense to get it into the libraries.

> I'd really rather it wind up central enough to be used in
> preference to nub wherever possible

You are welcome to your own preference. I, and many
other experienced Haskellers I know, prefer nub in many cases.
Let's just make both easily available please.

> (including in base!).

I wouldn't mind having ordNub in base. But let's at least
get it in somewhere convenient and easily usable. If you
focus the energy on trying to get it into base, this proposal
will likely die the same death as all previous attempts.

> Perhaps they can duplicate the minimum functionality
> necessary from Data.Set, internally behind the scenes?

Why should the GHC team agree to the maintenance burden
of that? They have enough of a challenge keeping up with the
work they already have.

But you know what, give it a try. Just don't get stuck
on that point if you meet with resistance.

> Alternatively, maybe we can move nub out of base?

No. nub is part of the Haskell standard, so it's required to
be there. Even if you disagree with my view that it should
be there on its own merits.

-Yitz


More information about the Haskell-Cafe mailing list