Calling C functions is not free, compilation becomes a lot more difficult, Go tooling is not as helpful. Signal handling is still a mess. It works in the happy path where the FFI is not on the hot path.
Calling C functions is not free, compilation becomes a lot more difficult, Go tooling is not as helpful. Signal handling is still a mess. It works in the happy path where the FFI is not on the hot path.
I think it is more a skill issue than anything else.
Yes, marshaling has a visible impact, hence why one should think how to actually make it happen, not much different from using FFI in any other programming language, there is always an impact over staying in the same programming language.
Compilation being harder, only if the developer is not acquainted with C, which seems to be something harder to learn nowadays.
Signal handling is a mess even in pure C, especially since all UNIX implementations added threading support.
Go makes signal handling harder. Further, there is no FFI call overhead in Rust, C++, Swift. It isn’t marshalling, a function with no args will still incur an overhead.
Because Rust, C++ don't have a GC, while Swift does have a GC (RC is a GC algorithm) it was designed to be compatible with Objective-C runtime, thus C.
Having to swap stacks has not much to do with GC.