English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[Caml-list] mutually dependent modules
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-02-19 (05:13)
From: Issac Trotts <ijtrotts@u...>
Subject: Re: [Caml-list] mutually dependent modules
cashin@cs.uga.edu wrote:

>Issac Trotts <ijtrotts@ucdavis.edu> writes:
>>let _ = A.f2 := B.f2
>I've seen this before, but why is it preferable to this?
>  A.f2 := B.f2
>There's an article on comp.lang.ml where Xavier Leroy mentions this
>syntax as a way to get module initialization code to run ... but I get
>the impression that folks are using it when it's semantically
>equivalent to the same thing with the "let _ = " omitted entirely.
I've seen both, but I now avoid the "let _ = " expression because if you 
leave it
out then ocamlc gives a warning when you don't supply all the arguments 
to a
function.  The warning is good to have.


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