Re: [Caml-list] a question about "ocamlopt" and "ocamldep"

2012-03-14 Thread Gabriel Scherer
Indeed, ocamlc is faster than ocamlopt (because there is less analysis in the backend, and simply less work to do to bridge the expressivity gap) and suited for fast compile-and-edit cycles. There are occasional cases when I've seen a use for ocamlopt, when I needed to integrate a "run automated t

Re: [Caml-list] a question about "ocamlopt" and "ocamldep"

2012-03-14 Thread Virgile Prevosto
2012/3/14 Matej Košík <5764c029b688c1c0d24a2e97cd7...@gmail.com>: > There are two scenarios when I use the compiler: > > Scenario 1 (most frequent): when I want to incrementally remove typing > errors during development. Various optimizations do not matter here. > What matters is a short time to r

Re: [Caml-list] a question about "ocamlopt" and "ocamldep"

2012-03-14 Thread Matej Košík
On 03/14/2012 11:23 AM, Gabriel Scherer wrote: >> :-( > > I don't understand. Why is it sad to have the *ability* to perform > cross-module implementation-dependent optimizations (at the inevitable > cost of locally damaging separate compilation) *if* you wish? There are two scenarios when I use

Re: [Caml-list] a question about "ocamlopt" and "ocamldep"

2012-03-14 Thread Gabriel Scherer
> :-( I don't understand. Why is it sad to have the *ability* to perform cross-module implementation-dependent optimizations (at the inevitable cost of locally damaging separate compilation) *if* you wish? On Wed, Mar 14, 2012 at 11:31 AM, Matej Košík <5764c029b688c1c0d24a2e97cd7...@gmail.com> wr

Re: [Caml-list] a question about "ocamlopt" and "ocamldep"

2012-03-14 Thread Matej Košík
On 03/13/2012 06:34 PM, Matthias Puech wrote: > This is consistent with how ocamlc/ocamlopt work: separate compilation > is ensured the way you think by bytecode .cmo compilation: to build a > module, you only need the *interfaces* of its dependencies, but it is > unfortunately not ensured when

Re: [Caml-list] a question about "ocamlopt" and "ocamldep"

2012-03-13 Thread Gabriel Scherer
> to build a module, > you only need the *interfaces* of its dependencies, but it is unfortunately > not ensured when compiling to native code It is actually possible to have separate compilation for .cmx, just like for .cmo: when ocamlopt looks for the .cmx for a given dependency, if it doesn't f

Re: [Caml-list] a question about "ocamlopt" and "ocamldep"

2012-03-13 Thread Matthias Puech
Hello, This is consistent with how ocamlc/ocamlopt work: separate compilation is ensured the way you think by bytecode .cmo compilation: to build a module, you only need the *interfaces* of its dependencies, but it is unfortunately not ensured when compiling to native code, because of the glo

[Caml-list] a question about "ocamlopt" and "ocamldep"

2012-03-13 Thread Matej Košík
Hi, The "ocamldep" tool generates Makefile dependencies for both situations: - when we use "ocamlc" - as well as when we use "ocamlopt" Dependencies, generated for "*.cmo" files, are corresponding "*.cmi" files. This is not surprising. However, dependencies, generated for "*.cmx" files, are alw