Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] ocaml and large development projects
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: John Max Skaller <skaller@o...>
Subject: Re: [Caml-list] ocaml and large development projects
Chris Hecker wrote:

> 
>> One issue to be aware of: if you build native code, when you change a 
>> module, then all dependent modules must be recompiled.  This can be 
>> surprising when a small change to a utility module causes a near full 
>> recompile of the project.  The byte-code compiler does not have this 
>> issue, and is sufficient for testing in most cases.
> 
> 
> Is this true?  The cmi file for the interface doesn't insulate you from 
> this in native code?  


Yes its true, but it should rarely be an issue.
I personally have a sequence of compiles:

m1.mli
m2.mli
..
mn.mli
m1.ml
m2.ml
..
mn.ml

and I simply start at the first needed place
and recompile everything afterwards. I have something
like 20 modules, and a 550 MHz PIII, and the ONLY
program that compiles so slowly I see any delay
is ocamllex (which is REALLY slow).


In other words, don't worry about it. Ocaml is FAST.
Don't try to finess building only required files,
it will take longer for (** expletive deleted **)
make and friends to find out which modules to
compile than to actually compile the lot.

I actually use a Python script, and I suspect the
timestamp comparisons needed take about the same
time as an actual compile .. I left checking
in to eliminate the need to rebuild the lexer
and parser (run ocamllex and ocamlyacc).

Which is all long winded praise to the
Ocaml team for producing a product that
not only generates fast code .. it generates it fast :-)

-- 
John Max Skaller, mailto:skaller@ozemail.com.au
snail:10/1 Toxteth Rd, Glebe, NSW 2037, Australia.
voice:61-2-9660-0850


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