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 MAA23363 for caml-redistribution; Mon, 20 Oct 1997 12:00:28 +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 RAA07458 for ; Fri, 17 Oct 1997 17:38:25 +0200 (MET DST) Received: from tequila.systemsz.cs.yale.edu (TEQUILA.SYSTEMSZ.CS.YALE.EDU [128.36.11.106]) by nez-perce.inria.fr (8.8.7/8.8.5) with ESMTP id RAA28515 for ; Fri, 17 Oct 1997 17:38:18 +0200 (MET DST) Received: from tequila.cs.yale.edu (localhost [127.0.0.1]) by tequila.systemsz.cs.yale.edu (8.8.6/8.8.6) with SMTP id LAA24690 for ; Fri, 17 Oct 1997 11:38:13 -0400 To: caml-list@inria.fr From: Stefan Monnier Newsgroups: lists.caml Subject: Re: module Set References: <199710151402.QAA06284@sun-demons.lri.fr> <199710170908.LAA29437@pauillac.inria.fr> Date: 17 Oct 1997 11:38:06 -0400 Message-ID: <5lafg81jtt.fsf@tequila.systemsz.cs.yale.edu> X-Newsreader: Gnus v5.5/Emacs 20.2 Path: tequila.systemsz.cs.yale.edu NNTP-Posting-Host: tequila.systemsz.cs.yale.edu Sender: weis Xavier Leroy writes: > 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. Of course, you can have your cake and eat it too in the present case: rename the current Set into OrderedSet (for instance) and then create a Set module (now that the other one disappeared) as a wrapper around OrderedSet. Stefan ---- Donc, en gros, au lieu de définir Set et OrderedSet indépendemment,, il suffit de définir Set au-dessus de OrderedSet et comme ça on peut avoir le beurre et l'argent du beurre: une interface propre et une bonne réutilisation du code. Stefan