On Fri, Jul 29, 2005 at 03:26:01PM +0900, Martin DeMello wrote:

> says, it's pretty much the best we have. (OCaml was another possibility,
> but it requires a significant investment in learning the language, the
> code will almost certainly be unmaintainable by anyone else, and its C
> interface is not nearly as painless as D's. Also D lets us leverage our
> C++ experience.)
> 
> martin

While I agree that there is a significant learning curve for OCaml, I can't
beleive that the C interface would be considered painful.

For example, the lseek function in the std C library can be directly called
after this simple definition.

	external lseek : int -> int -> int -> int = "lseek"

Basically, you are just giving the name of the C function, specifying the
OCaml types that map to what the C function expects and returns, then
giving the name OCaml will use to call the function.  After that, you
just link in the library containing the function you just defined.
This works for any C library.

Most languages don't make it this easy.

Rick

-- 
Rick Nooner
rick / nooner.net
http://www.nooner.net