Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] on the design of Dynlink
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Dave Mason <dmason@s...>
Subject: [Caml-list] on the design of Dynlink
I am curious about a design feature of Dynlink.

Assume module C uses module B and module B uses module A.

If A loads B and C, then it seems that C can see all of A and
everything it depends on.  This seems like a very unfortunate outcome,
because it means (for example) that C can now use Dynlink itself to
load things, and there is no way for A or B to provide an interface to
hide things from the modules that (transitively) use them.

Now, I understand how to work around this (provide a Registry module
that A calls to register the functions that it wants to provide to B
and C and then they call the Registry to get those values).  But that
is not a very intuitive style, and can make it difficult to extend B
in a completely general way unless, for each module B, I provide a
B'Registry and always load the pair.

Have I misunderstood something, or if I have it right, is there any
hope for this to work differently in future?

Thanks  ../Dave
To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: