On 02/03/14 17:27, John Cowan wrote:
> Daniel Carrera scripsit:
> 
>> Does that apply to other languages like Python?
> 
> Python does not work in the Chicken interpreter either.  :-) (Though in
> principle one could write a Python egg using the Python/C API.)

There's slightly more to it than this, however.

The FFI only works in compiled code, it's true. But you can compile a
module that uses the FFI, then use that module from the interpreter. You
just can't use the FFI *directly* because it works by integrating with
the compiler's generation of C code, which is then compiled by gcc.
Whereas the interpreter interprets directly, rather than going via C, so
the FFI doesn't have a C stage to integrate with.

This is similar to the situation with Python - to wrap a C library in
Python, you compile a stub module that you can then load from the Python
interpreter and away you go. The difference is that the stub module is
written in C, rather than Python; while Chicken "FFI stubs" are written
in whatever mix of Chicken and C you find convenient.

ABS

-- 
Alaric Snell-Pym
http://www.snell-pym.org.uk/alaric/

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to