2 ms·
> The answer is basically you don't. It's impossible to make a sane, stable FFI for a language unless you put it behind a C ABI The Swift folks have put a lot
by zozbot234 3y ago
> The answer is basically you don't. It's impossible to make a sane, stable FFI for a language unless you put it behind a C ABI
The Swift folks have put a lot of effort into attaining a stable ABI that's native to their language. They can achieve that because Swift is the officially endorsed language for development on Mac OS and iOS, so it (together with the platform itself) can set a standard that other languages will have to live with.
In a way, software VM's like the JVM and CLR can also be said to define 'ABIs' of sorts within their runtime, that every language implementation on these runtimes will have to deal with.