calling C code // drivers
Scott Lystig Fritchie
fritchie@REDACTED
Mon Sep 22 06:44:26 CEST 2003
>>>>> "vd" == Vlad Dumitrescu <vlad_dumitrescu@REDACTED> writes:
vd> Thus we could have everybody write their own BIFs!!
vd> :-) In any case, it would be easier to interfacce with external
vd> libraries (and also the result might be a little faster?)
An issue not mentioned in this thread yet is single-assignment. If
exyour C is using pointers/pass-by-reference to meddle with the caller's
data, you're almost always in trouble. (If the VM has never seen the
caller's data, then you're OK. But that isn't a very fun or useful or
real-world case.)
-Scott
P.S. One of the things that I've always wanted to do with my pet
project, Erlang Driver ToolKit (http://www.snookles.com/erlang/edtk/),
is to make it possible for drivers to access the raw Erlang tagged
term data. The formalism for passing serialized data into the driver
is nearly sufficient for the task.
But it doesn't solve the "one bug and your VM is toast" problem.
These Erlang people -- they're *so* fault-conscious. :-)
More information about the erlang-questions
mailing list