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
Dynamic link libraries
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 1998-12-22 (18:05)
From: Juan Jose Garcia Ripoll <jjgarcia@i...>
Subject: Dynamic link libraries
Hi everyone,

let me introduce myself. I'm a newcomer to ML and to the world of
functional programming in general. I'm currently giving OCaml and
Moscow-ML a try. From OCaml I like the possibility of writing external C
functions, but I dislike the limits that it imposes, that is:

* One has to generate a custom runtime

* One has to link those libraries against the runtime.

I believe this breaks modularity. Isn't it possible to support the

* Creation of *shared* bytecode/native-code Caml libraries.

* Dynamic loading of those libraries, much like Moscow-ML does: a simple
'load "filename.uo"'. (Moscow-ML is based on Caml-Light -- thus I
believe this must be possible, somehow)

* Linked executables (either native/bytecode ones) that make use of
those libraries.

* Dynamick linking of native DLLs, that is, those which are generated by
the C compiler, such as, etc. This is just a matter of 30
lines code in Linux and other unices which support the `dlopen'

* Exposure of the symbols loaded from a DLL, so that they are recognized
in "external" clauses.

This would lead to a better development evironment, and to some space
saving due to not having to produce custom runtimes. I will appreciate
any comment about why this hasn't been done already.



P.S: I don't know French, hence this single version message.