2 ms·
"Most users are going to do this via FFI, and then one .c and one .h pales in comparison to 'already has a dylib/so' I can use." This assumes two things: 1) t
by yellowapple 10y ago
"Most users are going to do this via FFI, and then one .c and one .h pales in comparison to 'already has a dylib/so' I can use."
This assumes two things:
1) that most users are indeed going to use this via FFI, which (to me at least) sounds like a very bold claim
2) that the target language provides easier support for precompiled shared libraries than it does for using an arbitrary .c or .h source file. This is not always (or even usually) the case, especially if the language's FFI mechanism comes from the C side rather than the target language side (see also: Perl (pre-6) and Ruby when not using third-party FFI modules) or if there are a lot of foreign functions needing an interface (in which case one will likely use some kind of generator, which usually requires the use of a C header to provide the foreign definitions).