caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Dependencies and rebuilding
@ 2007-03-07 20:07 Jakob Lichtenberg
  2007-03-07 21:24 ` [Caml-list] " Olivier Andrieu
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Jakob Lichtenberg @ 2007-03-07 20:07 UTC (permalink / raw)
  To: caml-list; +Cc: Donn Terry

If I change the body of functions in a base library, but not the
externally visible signature, I still have to recompile the consumers of
the base library prior to linking the main application.  While this is
not a problem in the trivial case I'll show beneath, it may be a concern
from a componentization and scalability point of view.  Regular C code
does not have this limitation.  This e-mail to request why the design is
as it is?


Example:

===
>type base.ml
let base () = 2+8;;

>ocamlopt -c base.ml

>type consumer.ml
let _ = Printf.printf "Base.base: %d" (Base.base());;

>ocamlopt -c consumer.ml

>ocamlopt base.cmx consumer.cmx -o app.exe

>app.exe
Base.base: 10

>notepad base.ml

>type base.ml
let base () = 2+9;;

>ocamlopt -c base.ml

>ocamlopt base.cmx consumer.cmx -o app.exe
Files consumer.cmx and base.cmx
make inconsistent assumptions over implementation Base

>ocamlopt -c consumer.ml

>ocamlopt base.cmx consumer.cmx -o app.exe

>app.exe
Base.base: 11
===

Thanks,

- Jakob Lichtenberg


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2007-03-09  8:09 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-07 20:07 Dependencies and rebuilding Jakob Lichtenberg
2007-03-07 21:24 ` [Caml-list] " Olivier Andrieu
2007-03-07 21:47   ` Jakob Lichtenberg
2007-03-07 21:25 ` Zheng Li
2007-03-08  7:05 ` [Caml-list] " Alain Frisch
2007-03-08 16:55   ` malc
2007-03-09  8:01     ` Alain Frisch
2007-03-09  8:06       ` malc

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).