Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Stefan Monnier <monnier+lists/caml/news/@TEQUILA.SYSTEMSZ.CS.YALE.EDU>
To: caml-list@inria.fr
Subject: Re: module Set
Date: 17 Oct 1997 11:38:06 -0400	[thread overview]
Message-ID: <5lafg81jtt.fsf@tequila.systemsz.cs.yale.edu> (raw)
In-Reply-To: <199710170908.LAA29437@pauillac.inria.fr>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 890 bytes --]

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





  parent reply	other threads:[~1997-10-20 10:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-10-15 14:02 Jean-Christophe Filliatre
1997-10-17  9:08 ` Xavier Leroy
1997-10-17 13:46   ` Jean-Christophe Filliatre
1997-10-17 15:18   ` Judicael Courant
1997-10-17 15:38   ` Stefan Monnier [this message]
1997-10-20  8:04   ` Vincent Poirriez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5lafg81jtt.fsf@tequila.systemsz.cs.yale.edu \
    --to=monnier+lists/caml/news/@tequila.systemsz.cs.yale.edu \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox