From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id PAA31462; Wed, 16 Oct 2002 15:13:02 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id PAA30667 for ; Wed, 16 Oct 2002 15:13:01 +0200 (MET DST) Received: from lri.lri.fr (lri.lri.fr [129.175.15.1]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g9GDD0502349 for ; Wed, 16 Oct 2002 15:13:00 +0200 (MET DST) Received: from serveur-mail.lri.fr (serveur-mail [129.175.8.90]) by lri.lri.fr (8.11.6/jtpda-5.3.2) with ESMTP id g9GD41R06616 ; Wed, 16 Oct 2002 15:04:01 +0200 (MEST) Received: from serveur-demons (mail@serveur-demons [129.175.8.130]) by serveur-mail.lri.fr (8.11.6/jtpda-5.3.2) with ESMTP id g9GD40x20849 ; Wed, 16 Oct 2002 15:04:01 +0200 (MEST) Received: from marche by serveur-demons with local (Exim 3.35 #1 (Debian)) id 181nqC-0005tf-00; Wed, 16 Oct 2002 15:04:00 +0200 From: Claude Marche MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <15789.25535.986049.889625@mailhost.lri.fr> Date: Wed, 16 Oct 2002 15:03:59 +0200 To: Yang Shouxun Cc: caml-list@inria.fr Subject: Re: [Caml-list] automatic extraction of mli file? In-Reply-To: <3DA80C9F.1050401@fltrp.com> References: <3DA8021B.3050102@fltrp.com> <005701c271e3$30eb3130$55203151@warp> <3DA80C9F.1050401@fltrp.com> X-Mailer: VM 6.93 under Emacs 20.7.2 X-MailScanner: Found to be clean Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk >>>>> "Yang" == Yang Shouxun 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