From: Markus Mottl <markus@mail4.ai.univie.ac.at>
To: Brian Rogoff <bpr@best.com>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] indent 2
Date: Mon, 23 Jul 2001 12:20:04 +0200 [thread overview]
Message-ID: <20010723122004.A12189@chopin.ai.univie.ac.at> (raw)
In-Reply-To: <Pine.BSF.4.21.0107221516070.9238-100000@shell5.ba.best.com>; from bpr@best.com on Sun, Jul 22, 2001 at 17:27:26 -0700
On Sun, 22 Jul 2001, Brian Rogoff wrote:
> A little extra section on programming with functors and the interaction
> with the file system would be helpful. I've read the manual and the
> libraries, and there is not really a consistency of style there. For
> instance module types in the manual are UPPER_CASE, but MixedCaseWithSuffix
> in the libraries. In another document the style used "Sig" as a suffix to
> MixedCaseSuffix as opposed to Type in the libraries. Is there a preferred
> style yet? I've been playing with some heavily functorized libraries
> ported over from SML and since I'd like to make them Caml style I'd like
> examples of the desired naming styles.
I don't know whether this is "a" standard style, but I have at least
seen it often and also use it consistently: module types are written in
capital letters where different words are separated by an underscore,
e.g.: "PARTIAL_ORDER".
Module implementations are written without underscores and with small
letters, but the first char of each subword is capitalized, e.g:
"PartialOrder".
> There was also some discussion on the duplication of module information in
> the .mli and .ml files on the list which is a fine addition to either the
> FAQ or style guide.
I didn't have the impression so far that any kind of "standard"
concerning the use of modules has appeared. Especially what concerns
functorized code, people use different approaches. See, for example,
the standard library (Set, Map) that puts both the result signatures of
functors and the functor signatures into the .mli file associated with the
implementation and therefore by necessity also into the implementation
files. I am not sure what the advantages are besides having to maintain
two files only. To me this looks like bad practice, because then I really
have to update two files if the signature changes (e.g. is extended),
which is not the case in approaches that use more than two files.
Furthermore, I think it is very cumbersome that implementations always
get opaque type. It might be a good idea to develop a scheme that allows
us to easily exploit concrete representations to e.g. extend them with
additional functionality that cannot be replicated efficiently (or at
all) with the abstract type alone. I'll describe an approach that I have
recently come across in another mail...
Regards,
Markus Mottl
--
Markus Mottl markus@oefai.at
Austrian Research Institute
for Artificial Intelligence http://www.oefai.at/~markus
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
next prev parent reply other threads:[~2001-07-23 10:20 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-21 11:29 Damien Doligez
2001-07-21 16:45 ` Alexander V. Voinov
2001-07-21 18:07 ` Brian Rogoff
2001-07-22 10:06 ` Pierre Weis
2001-07-22 11:20 ` Markus Mottl
2001-07-23 0:27 ` Brian Rogoff
2001-07-23 7:52 ` Luc Maranget
2001-07-23 10:20 ` Markus Mottl [this message]
2001-07-22 19:40 ` Jeremy Fincher
-- strict thread matches above, loose matches on Subject: below --
2001-07-21 4:50 [Caml-list] Dequeues (was Generation of streams is slow) Brian Rogoff
2001-07-21 5:03 ` [Caml-list] indent 2 Alexander V. Voinov
2001-07-21 11:09 ` Pierre Weis
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=20010723122004.A12189@chopin.ai.univie.ac.at \
--to=markus@mail4.ai.univie.ac.at \
--cc=bpr@best.com \
--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