3 Dec 16:22
Re: Proposal: Bounded instance for IntSet (ticket #1953)
David Benbennick <dbenbenn <at> gmail.com>
2007-12-03 15:22:48 GMT
2007-12-03 15:22:48 GMT
On 12/3/07, Yitzchak Gale <gale <at> sefer.org> wrote: > In this case, the Ord instance is not really natural; it is defined > for technical reasons for use by the library itself (and its > friends). The library has no need for a Bounded instance, so why > should we prevent people from defining one for some other purpose? Note that in one sense, people are already prevented from defining a different Bounded instance. Any Bounded instance other than the one suggested in this proposal would fail to obey the axioms of the Bounded class. In other words, there is a unique largest element, and a unique smallest element, an no one can legitimately define a different Bounded instance. Given that the Bounded instance is uniquely defined, I think it is more convenient to have it defined by the library than to have to manually define it in every program that uses it.
RSS Feed