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
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-19 (06:14)
From: Bardur Arantsson <spam@s...>
Subject: Re: Help interfacing with C
Nathaniel Gray wrote:
> On 8/18/06, Bardur Arantsson <> wrote:
>> Nathaniel Gray wrote:
>> > On 8/16/06, Bardur Arantsson <> wrote:
>> >> Nathaniel Gray wrote:
>> >> > Hi folks,
>> >> [--snip--]
> Let me be clear about this -- it's not really about performance.  I'm
> looking at the entire sequence of operations and data structures
> needed to make a select call.  Here's a typical example with the
> current API:
[--snip-- example --snip--]

Ok, I did understand _what_ you are trying to do, I'm just not sure why 
anyone wouldn't choose the path of least resistance -- a solution in C 
is likely to be more error-prone (as you've discovered ;)) and harder to 
maintain if there are changes in OCaml internals -- whereas 
is likely to remain that way "forever". Of course if the aim of the 
whole exercise is to get the modified select included in OCaml then I 
guess there's your motivation for doing it in C ;).

However, if you just want a nicer interface then there are other 
solutions such as Gerd Stolpmann's "Equeue" framework. I would just use 
that instead of worrying about It provides much nicer 


Bardur Arantsson

- If you can remember drinking it, you obviously didn't drink
enough of it.