MIME-RPC as an FFI (was Re: Storable Class)

Sven Panne Sven.Panne@informatik.uni-muenchen.de
Fri, 04 Jan 2002 21:11:50 +0100


S. Alexander Jacobson wrote:

> [...] It seems to focus on local interfaces rather than on

> interfaces that will also work accross network connections.

> 
> A modern FFI interface should offer both transparent object

> serialization (like Java, but readable) and interfaces that

> work between programs running on different machines (RPC).


Granted, but our design is minimalistic and *much* less ambitious:
It should be relatively easy to implement (otherwise it probably
won't get implemented at all :-} and should only provide the things
which otherwise can't be expressed in pure Haskell. Higher-level
and convenience stuff, even such "easy" things as provided in the
Marshal* modules, are a library issue in our view.

Interfacing to non-local interfaces is beyond the scope of the FFI
draft, mainly because there is not "the" way to do it. Some day the
draft hopefully finds its way into the H98 report as an addendum,
and this is definitely not the right place for experimental stuff.
It was quite hard to find consensus even on such simple things as
the syntax for external entities (anybody remembers "Wadler's law
of language design"? :-), the typing of plusPtr, the handling of
newtypes, etc.

> [...] I've tried to document its use as an FFI at MIME-RPC.com

> (and created a discussion group for MIME-RPC related issues at
> http://groups.yahoo.com/group/mime-rpc).


I'll surely have a look at this.


> [...] However, there are no Haskell or C implementations yet. [...]


The current FFI stuff is very probably a basis for implementing your
stuff in Haskell as a library. Even if it's not, it would be interesting
to hear what is missing. A rudimentary implementation is probably the
best starting point for a discussion, some "real" programs using it
would be even better.

Cheers,
    S.