From: Claude Marche <Claude.Marche@lri.fr>
To: Yang Shouxun <yangsx@fltrp.com>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] automatic extraction of mli file?
Date: Wed, 16 Oct 2002 15:03:59 +0200 [thread overview]
Message-ID: <15789.25535.986049.889625@mailhost.lri.fr> (raw)
In-Reply-To: <3DA80C9F.1050401@fltrp.com>
>>>>> "Yang" == Yang Shouxun <yangsx@fltrp.com> writes:
Yang> All the comments will be removed. That is not desirable, for the mli
Yang> file is meant to be read by both machine and humans. The humans need the
Yang> comments to make sense of the interface file, without reference to the
Yang> implementation code.
Yang> I guess an extension to the ocamlweb is what I mean.
I would not have answered if you did not talk about ocamlweb. But as
one co-author, please let me say that I don't like this
idea. Mainly, because comments you put in a .mli and in the
corresponding .ml should not be the same. in the interface, you
document your module for use by another programmer, whereas the
comments of the implementation should be for explaining your code, your
algorithms, etc.
My advice is: always start a module by writing the .mli. When
prototyping, that usually means that you will add only one value, for
the main function of your module. When I teach ocaml to students, I
always insist on that, because it's better to force you write down
*what* you want to code, before thinking about *how*.
Then later, you may add to the .mli other functions, exceptions,
etc. and in any case you will both maintain the .mli and the .ml
independently.
- Claude
--
| Claude Marché | mailto:Claude.Marche@lri.fr |
| LRI - Bât. 490 | http://www.lri.fr/~marche/ |
| Université de Paris-Sud | phoneto: +33 1 69 15 64 85 |
| F-91405 ORSAY Cedex | faxto: +33 1 69 15 65 86 |
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
next prev parent reply other threads:[~2002-10-16 13:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-12 11:06 Yang Shouxun
2002-10-12 11:33 ` Nicolas Cannasse
2002-10-12 11:50 ` Yang Shouxun
2002-10-12 12:52 ` Sven LUTHER
2002-10-16 13:03 ` Claude Marche [this message]
2002-10-12 11:55 ` Remi VANICAT
2002-10-13 10:20 ` Xavier Leroy
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=15789.25535.986049.889625@mailhost.lri.fr \
--to=claude.marche@lri.fr \
--cc=caml-list@inria.fr \
--cc=yangsx@fltrp.com \
/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