EEP 7 withdrawal?

Alceste Scalas alceste@REDACTED
Fri Jul 30 19:08:54 CEST 2010


Hi all,

since Erlang/OTP R14B is going to feature a new and shiny (and
API-stable) NIF interface, I think that EEP 7 (Foreign Function
Interface for Erlang) could be withdrawn.

The NIF interface solves the main issue that the FFI proposal wanted to
address: the lack of an easy and efficient way to call native functions
from Erlang.  And it even offers something that one would have never
dared to ask: a complete interface for handling Erlang terms from C!

EEP 7 is now just an interface to GCC's libffi: i.e. an utility module
for performing dynamic C calls from Erlang, with automatic Erlang <-> C
type conversion, and some macros for fiddling with memory buffers and
native types.  All of this can be now implemented as a standard,
NIF-based module, without patches to the Erlang VM; and since its use
cases are quite limited, they do not deserve an EEP (at least IMHO).

What do you think?

For the record, I've put together an initial implementation of an FFI
module for R14, available here:

        http://muvara.org/hg/erlang-ffi

Some stuff defined in EEP 7 is missing, because it's now better handled
using NIFs (e.g. support for Erlang binaries and ErlIOVec's).

Regards, and keep up with your wonderful work,
-- 
Alceste Scalas <alceste@REDACTED>
CRS4 - http://www.crs4.it/



More information about the eeps mailing list