Arc Forumnew | comments | leaders | submitlogin
3 points by cng 5893 days ago | link | parent

Pyrex (http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/) is a pretty interesting project to look at in this regard. It's not an ffi per se, but allows one to write C extension modules in a Python-like language, mixing Python and C datatypes freely. It would definitely be useful if Arc was capable of something like this, as it would make the language useful for numerical codes (my interest), system-level programming, etc.


2 points by treef 5893 days ago | link

There is plenty of scheme to c compilers. I would think that one could compile arc to c and have option to go lower level and code c like constructs in arc.

I much prefer pypy rpython approach though it uses rtype (like ctype) to ffi to c most of the time but during complication of rpython to c the rtypes get replace completely. I think pyrex is a bit of a dead end.

-----

1 point by sacado 5890 days ago | link

I love Pyrex too. However, that means making (and maintaining) another compiler that should be compatible with Arc and still allow the extension features. That's a problem with Pypy, actually. You can't use any Python code in it, and it is quite restrictive in some cases.

However, you're quite right as I took the names cdef, cint, etc. from Pyrex.

-----