(FFI) is a programming language mechanism that allows software written in one language to use resources (functions and data structures) that were written in and compiled with a different language.
These ”foreign” resources typically take the form of shared libraries, such as DLL files in Windows (or ’.so’ files in Linux and Mac) and can include run-time services made available by your operating system.
A good example is a driver library provided by a vendor of a computer peripheral, such as a printer or a network card.
~
* The Limits of Elm/JS Interop guide
> Many languages have a Foreign Function Interface (FFI) that allows direct bindings functions in the host language. For example, Scala can call Java functions directly. Same with Clojure/Java, Python/C, Haskell/C, and many others. Elm does not have a traditional Foreign Function Interface with JavaScript. It is not possible to call arbitrary JavaScript functions at any time. This has tradeoffs that some people really love, but it is not for everyone! If you are evaluating Elm for commercial use, I highly encourage you to look through these interop examples to get a feeling for whether flags, ports, and custom elements can cover everything you need. Why does Elm make a different choice than other languages on this?
YOUTUBE uGlzRt-FYto “What is Success?” by Evan Czaplicki, 2018