To: caml-list@inria.fr
From: Stefan Monnier <monnier+lists/caml/news/@TEQUILA.SYSTEMSZ.CS.YALE.EDU>
Subject: Re: module Set
Date: 17 Oct 1997 11:38:06 -0400
Xavier Leroy <Xavier.Leroy@inria.fr> 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
This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:12 MET