English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Help interfacing with C
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2006-08-21 (22:35)
From: Nathaniel Gray <n8gray@g...>
Subject: Re: [Caml-list] Re: Help interfacing with C
On 8/19/06, Olivier Andrieu <oandrieu@nerim.net> wrote:
>  Nathaniel Gray [Friday 18 August 2006] :
>  > Now of course this could all be done at the ocaml level, but
>  > wouldn't it be nicer to do the elegant thing in the first place
>  > instead of cleaning up the mess afterwards?  ;^)
> Erm, doing things on the C side isn't especially "elegant",
> sorry. It's way more error-prone, more complicated to compile/link
> against, and in your case it's not even portable (your version is
> Unix-only).

I see.  In that case I move we eliminate the whole Unix module.  It's
all written in error-prone, complicated, non-portable C!

The point is that we need *some* interface to the select system call.
By it's nature, it must be written in C.  We can, with very little
work (about 10-20 LOC or less), have a more elegant interface to the
select system call that reduces the amount of cruft needed to make a
typical select call.  I'm doing this work, because it's useful to me.
Because I believe it could be useful to others, I'm also trying to
create a patch against the compiler for submission to the ocaml team.
I'm not claiming it's a revolutionary change or massively faster, just
an interface that's more pleasant to program with.


>>>-- Nathaniel Gray -- Caltech Computer Science ------>
>>>-- Mojave Project -- http://mojave.cs.caltech.edu -->