Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Str.string_match raising Invalid_argument "String.sub" in gc
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Xavier Leroy <Xavier.Leroy@i...>
Subject: Re: [Caml-list] dynamic loading and OS interface
> What is the current status of dynamic loading? I've seen a lot
> of implementations for Unix, and it shouldn't be too difficult to
> port them to Win32 (I tried it once), although it requires some design
> choices. Are there plans to add it in the near future?

I'm working on it right now (when not replying to the numerous
messages on this list :-).  If you're curious, you can look at the
"dynamic_loading" branch on the OCaml development sources
(camlcvs.inria.fr).  I'll post more information about it once I'm
happy with the result, to get some feedback on the design.

> > A better apporach might be to ape Python and the SML Basis Library by
> > providing a
> > generic "OS" module which abstracts at least Unix/Win/Mac away. I
> would
> > prefer this, since I feel silly using Unix.<blah> on a Windows box
> :-).

In a way, that's how the OCaml library is structured already:
the OS-independent stuff is in Pervasives and Sys, and corresponds
roughly to what ANSI C offers; Unix is the OS-dependent stuff,
corresponding roughly to Posix + BSD sockets.

But of course users want all functions to be available in an
OS-independent manner, for easy porting of their programs, and that's
how we ended up with an emulation of the Unix module under Windows.  
Still, there are limits to what an OS-independent interface can
provide if you want to remain truly portable.

- Xavier Leroy
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr