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] 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: 2001-08-24 (09:24)
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
(  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:  FAQ:
To unsubscribe, mail  Archives: