0

I'm working on a project that requires using multiple programming languages. I'm confused about what term to use to specify the interfaces available to bind two languages, e.g JNI, ctypes, jpype, etc. I don't want to limit the meaning to say that the binding exists only between high level and low level languages(java-c or python-c). Most definitions mention this to be a criteria for a foreign function interface(FFI). What would be a better term to use? FFI, bridging technology or something else?

1

A foreign function interface is a mechanism by which code written for one runtime (or language) can call code written for another runtime (or language) within the same process. The code written in the foreign language has to satisfy the FFI in order to be called by the runtime. The levels of abstraction don't really matter. The fact that most FFIs are based on the C ABI is a product of its ubiquity, not inherent to the notion.

Many DSLs have an FFI into managed languages. Even if they share a runtime, restrictions on the signatures of the callees make it qualify.

Non FFIs include any sort of RPC mechanism that operates over a plain socket, rather than by directly jumping to the executable code (modulo JIT).

0

From the perspective of any particular language it is an external interface.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.