calling C code // drivers

Håkan Stenholm hakan.stenholm@REDACTED
Sat Sep 20 23:25:12 CEST 2003

On lördag, sep 20, 2003, at 21:50 Europe/Stockholm, Vlad Dumitrescu 

> Hi,
> I sat and daydreamed today, and I have a few questions that I hope 
> someone
> 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 - 
> in
> theory, I can't see any reason why one couldn't compile C code to look 
> like
> 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 
> (and
> also the result might be a little faster?)
> Is this possible at all, or am I unaware of issues that forbid it?
> regards,
> Vlad

More information about the erlang-questions mailing list