Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
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.

Issac



-------------------
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