[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Damien Doligez <Damien.Doligez@i...> |
| Subject: | Re: automatic construction of mli files |
>From: Jean-Christophe Filliatre <filliatr@csl.sri.com>
>In the extreme situation where there is no real need for writing an
>interface, you can either simply not write one (this is not mandatory)
>or generate it from the code with "ocamlc -c -i".
There are two technical details you should all know concerning .mli
files:
1. If you don't use .mli files, or if you generate them automatically
from the corresponding .ml files, then you lose separate
compilation: whenever you change a semicolon in foo.ml, all
the files that depend on module Foo will have to be recompiled.
This may or may not be a big problem depending on the size of your
project.
2. Due to rather complex implementation issues, if you don't use .mli
files and let the compiler generate the .cmi from the .ml, then
garbage collection will be slightly slower. If you do it for all
your files, you might lose as much as 8% on the speed of your
program.
-- Damien