From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id KAA09732; Mon, 5 Nov 2001 10:23:04 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id KAA09774 for ; Mon, 5 Nov 2001 10:23:03 +0100 (MET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id fA59MqH24166; Mon, 5 Nov 2001 10:22:52 +0100 (MET) Received: (from xleroy@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id KAA09857; Mon, 5 Nov 2001 10:22:51 +0100 (MET) Date: Mon, 5 Nov 2001 10:22:51 +0100 From: Xavier Leroy To: "Marcin 'Qrczak' Kowalczyk" Cc: caml-list@inria.fr Subject: Re: [Caml-list] Sorting Message-ID: <20011105102251.C8282@pauillac.inria.fr> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: ; from qrczak@knm.org.pl on Wed, Oct 31, 2001 at 07:54:16AM +0000 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > What are advantages and disadvantages in parametrizing either by '<' > or by the 3-way comparison? In addition to what has been said already, the 3-way comparison is less error-prone with respect to two classic errors: 1- passing a "less than or equal" predicate where a "less than" predicate is expected, or conversely; 2- passing a predicate that is not a total ordering where a total ordering is expected. Both errors could cause the old Sort.array or Sort.list functions to misbehave seriously. These errors are still possible with the 3-way comparison approach, but less likely I think. - Xavier Leroy ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr