calling C code // drivers
Sat Sep 20 23:25:12 CEST 2003
On lördag, sep 20, 2003, at 21:50 Europe/Stockholm, Vlad Dumitrescu
> I sat and daydreamed today, and I have a few questions that I hope
> will be kind enough to answer...
> Are there any specific reasons to use the current way of interfacing
> with C
> code (i.e. the drivers) as it is today opposed to another one? What
> are the
> arguments for not using a more direct way than today? What I have in
> mind is
> the fact that with Hipe Erlang functions are compiled to native code -
> theory, I can't see any reason why one couldn't compile C code to look
> Hipe generated one.
Hipe only works on certain OS/CPU combinations (Linux/Intel and
Solaris/Sparc) so a number of currently supported platforms
(Windows/Intel, MacOSX/PPC, Linux/PPC, ...) couldn't handle interfacing
to C this way.
> Thus we could have everybody write their own BIFs!! :-)
> In any case, it would be easier to interfacce with external libraries
> also the result might be a little faster?)
> Is this possible at all, or am I unaware of issues that forbid it?
More information about the erlang-questions