From: Judicael Courant <Judicael.Courant@ens-lyon.fr>
To: caml-list@inria.fr
Subject: Re: module Set
Date: Fri, 17 Oct 1997 17:18:21 +0200 (MET DST) [thread overview]
Message-ID: <199710171518.RAA10797@anjou.ens-lyon.fr> (raw)
In-Reply-To: <199710170908.LAA29437@pauillac.inria.fr> (message from Xavier Leroy on Fri, 17 Oct 1997 11:08:42 +0200 (MET DST))
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
next prev parent reply other threads:[~1997-10-20 9:58 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 [this message]
1997-10-17 15:38 ` Stefan Monnier
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=199710171518.RAA10797@anjou.ens-lyon.fr \
--to=judicael.courant@ens-lyon.fr \
--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