From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id LAA23315 for caml-redistribution; Mon, 20 Oct 1997 11:58:06 +0200 (MET DST) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id RAA07054 for ; Fri, 17 Oct 1997 17:18:26 +0200 (MET DST) Received: from cri.ens-lyon.fr (cri.ens-lyon.fr [140.77.1.32]) by nez-perce.inria.fr (8.8.7/8.8.5) with ESMTP id RAA28197 for ; Fri, 17 Oct 1997 17:18:24 +0200 (MET DST) Received: from lip.ens-lyon.fr (lip [140.77.11.11]) by cri.ens-lyon.fr (8.8.5/8.8.1) with ESMTP id RAA03592 for ; Fri, 17 Oct 1997 17:18:23 +0200 (MET DST) Received: from anjou.ens-lyon.fr (anjou [140.77.11.117]) by lip.ens-lyon.fr (8.8.5/8.8.0) with ESMTP id RAA15037 for ; Fri, 17 Oct 1997 17:18:22 +0200 (MET DST) Received: (from jcourant@localhost) by anjou.ens-lyon.fr (8.8.5/8.8.0) id RAA10797 for caml-list@inria.fr; Fri, 17 Oct 1997 17:18:21 +0200 (MET DST) Date: Fri, 17 Oct 1997 17:18:21 +0200 (MET DST) Message-Id: <199710171518.RAA10797@anjou.ens-lyon.fr> From: Judicael Courant To: caml-list@inria.fr In-reply-to: <199710170908.LAA29437@pauillac.inria.fr> (message from Xavier Leroy on Fri, 17 Oct 1997 11:08:42 +0200 (MET DST)) Subject: Re: module Set Reply-to: Judicael.Courant@ens-lyon.fr (Judicael Courant) Mime-Version: 1.0 (generated by tm-edit 7.43) Content-Type: text/plain; charset=US-ASCII Sender: weis Hello, > >> I would like to use this property ; can't you give us this property in >> the module Set for the next release ? > >I'd rather not. What you're looking for is not sets, but sets with >some extra ordering properties. Don't use the generic Set package, then. >Use your own Ordered_set package. (Feel free to cut and paste from >set.ml to implement it, of course.) Well-defined abstract interfaces >are more important that code sharing, in my opinion. > Then, I think everybody would be happy with the following solution : - Jean-Christophe implements an Ordered_set package (by cuting and pasting the current Set); - You integrate it into the next release; - By the way, you take advantage of this new Ordered_set module to replace the implementation of Set by mine (set.mli remains unchanged of course) : ---------------------------------------------------------------------- (* set.ml *) (* a very clever implementation of set.mli *) (* generously put in the public domain by Judicael Courant *) open Ordered_set module type OrderedType= OrderedType module type S = S module Make = Make (* That's all folks ! *) ---------------------------------------------------------------------- Hence, you have very-well defined abstract interfaces together with code sharing. Isn't that a very good solution ? :-) Judicael. -- Judicael.Courant@ens-lyon.fr, http://www.ens-lyon.fr/~jcourant/ tel : (+33) 04 72 72 82 28 Beware of bugs in the above code; I have only proved it correct, not tried it. -- Donald Knuth