4 Dec 04:08
Re: Proposal: Bounded instance for IntSet (ticket #1953)
Stefan O'Rear <stefanor <at> cox.net>
2007-12-04 03:08:35 GMT
2007-12-04 03:08:35 GMT
On Mon, Dec 03, 2007 at 05:56:50PM -0800, David Benbennick wrote: > On 12/3/07, Ross Paterson <ross <at> soi.city.ac.uk> wrote: > > But in the case at issue, the proposed Bounded instance is > > counter-intuitive because the underlying Ord instance is. That Ord > > instance is an arbitrary choice that is accepted because it allows IntSets > > to be used as search keys; it makes no sense on its own. > > I don't find that to be the case. If you had asked me to > independently come up with an ordering on IntSets, the existing > ordering is exactly what I would have invented. As I said earlier, > lexicographic order is very well known. It's arbitrary, but it's a > universally-agreed arbitrary. It's how words are ordered in paper > dictionaries, for example. > > (To be precise, to compare two IntSets, you convert them to lists with > toList, then compare the lists with lexicographic order.) I would have used descending order; so it's not *completely* universal. Stefan
_______________________________________________ Libraries mailing list Libraries <at> haskell.org http://www.haskell.org/mailman/listinfo/libraries
RSS Feed