From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id TAA30997 for caml-redistribution; Tue, 22 Dec 1998 19:05:18 +0100 (MET) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id KAA30985 for ; Tue, 22 Dec 1998 10:47:51 +0100 (MET) Received: from alarcos.uclm.es (alarcos.uclm.es [161.67.26.25]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id KAA12063 for ; Tue, 22 Dec 1998 10:47:49 +0100 (MET) Received: from ind-cr.uclm.es (IDENT:jjgarcia@[161.67.37.202]) by alarcos.uclm.es (8.9.0/8.9.0) with ESMTP id KAA23709 for ; Tue, 22 Dec 1998 10:47:48 +0100 Sender: weis Message-ID: <367F6A20.75483E90@ind-cr.uclm.es> Date: Tue, 22 Dec 1998 10:45:04 +0100 From: Juan Jose Garcia Ripoll Organization: Universidad de Castilla-La Mancha X-Mailer: Mozilla 4.07 [en] (X11; I; Linux 2.0.36 i686) MIME-Version: 1.0 To: caml-list@inria.fr Subject: Dynamic link libraries Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 following? * 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 libX11.so, etc. This is just a matter of 30 lines code in Linux and other unices which support the `dlopen' function. * 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. Regards Juanjo P.S: I don't know French, hence this single version message.