[ocaml-platform] on the need and design of OCaml namespaces

Yaron Minsky yminsky at janestreet.com
Mon Feb 25 14:14:17 GMT 2013


On Sun, Feb 24, 2013 at 2:39 PM, Christophe TROESTLER
<Christophe.Troestler at umons.ac.be> wrote:
> On Fri, 22 Feb 2013 11:39:41 +0100, Daniel Bünzli wrote:
>>
>> So if the problem is `-pack` is not good enough because it produces a huge
>> `cmo`, why not just try to find a corresponding concept workable with
>> `cm[x]a` ?
>
> As I understand it, people are not happy with -pack not for the large cm[x]a
> files but because the whole library is included in every executable even if
> only a small subset of the library is used.  Would the "problem" with -pack
> still exist if this was solved?

I think of there as being three key problems with -pack:

- The pack is a single unit that has to be loaded or not as a unit (as
  per your point.
- The pack is a choke-point in the dependency graph.  If you depend on
  one thing in a pack, that you need to be recompiled if anything in
  the pack changes.
- Opening a pack like Core.Std is brutally slow, and really affects
  performance of the build.

I think all of these issues need solving.

y


More information about the Platform mailing list