On 10 June 2011 06:50, Javier Pimás <elpochodelagente@gmail.com> wrote:
I think that Alien vs. FFI has more to do with historic reasons than anything else. If I'm right, the original FFI implementation had some problems, like not being reentrant, and therefore not supporting callbacks among other things (someone correct me if wrong). Alien came to solve some of these limitations, but hen FFI was improved and made reentrant, and now both implementations do more or less the same. NativeBoost on the other hand is more like a model of machine instructions, so that you can assemble them. One particular use is to implement the C calling convention, getting a 100% smalltalk FFI.
Eliot and Igor will probably be able enlighten us better.
Yes, you are right. NativeBoost actually more than just FFI , it is an API for generating native code at run time. FFI implementation is just one of a many use cases of it :) In contrast to C implementation, which comes as precompiled binary library, a NativeBoost code sits in image. So, if there are bug or missing feature you can fix it right there, without need to recompile VM. IMO, this is most important advantage comparing to statically compiled C code. Concerning Alien and FFI: FFI is faster, but Alien is more flexible. So.. it is hard to say, which one i would recommend to use (apart from NativeBoost ;) I think that both are quite ok.
Regards, Â Â Â Â Â Â Javier.
-- Best regards, Igor Stasenko AKA sig.