Pros and cons of a tight coehesion typed FFI

Constructing a C call from a typed array of arguments is far from trivial. There are a couple if libraries to that (one used by the SWI-Prolog ffi pack). The ffi pack combines an array of types with an array of term_t types (which you get for free anyway in SWI-Prolog). Besides the portability limitations involved in this approach I stand by the reasons not going into the direction I gave in the post linked below.

I like what I see in the Rust interface!

P.s. The current approach also avoids most of the GC issues. For example, we can pass the native C string associated with an atom as the term_t argument protects the atom from being garbage collected while the foreign code runs.