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: David Brown <caml-list@d...>
Subject: Re: [Caml-list] ocaml and large development projects
On Sat, May 17, 2003 at 11:10:03PM -0700, Chris Hecker wrote:

> Do people think I'm overreacting there?  I can't believe anyone thinking 
> about using ocaml for big native code projects wouldn't consider this a 
> 100% showstopper.  I certainly would have thought differently about using 
> ocaml if I'd known this when I started my project.

> If this can't be fixed, there needs to be a way to disable cross-file 
> inlining so that it can be worked around (and the checksums should reflect 
> this, and ocamldep should do the right thing, etc.), and then when you want 
> to "globally optimize" you can recompile the world.

I do agree that there should be an option to disable cross-file
inlining.  Somehow that would have to be coordinated with the
dependencies.  I don't know if this would be easy to implement, though,
since I don't think the code doing the inlining knows where the
functions came from.

In my experience, it isn't as bad as you make it sound like.  Touching
early modules doesn't cause a recompile of everything, only modules that
directly depend on it.  The inlining seems to only happen to one level.

However, ocaml is not alone in supporting cross-file inlining.  The
GNU-Ada compiler (GNAT) supports cross-module inlining.  It is an
option, that is not enabled by default.  The compiler automatically
detects the extra dependencies when it is enabled, and recompiles as
necessary.

There are a few C compilers that support cross-file inlining, but the
ones that I know of do it at "link" time.  So instead of extra
recompiles of source files, you end up with extremely long link times,
since it is doing the global analysis of everything each time you link.

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