3 ms·
I actually find Swift's C interop pretty extraordinary. Miles better than cgo, JNI, cffi/Cython/ctypes, etc. Parsing C headers, complete with comments and stuf
by gok 8y ago
I actually find Swift's C interop pretty extraordinary. Miles better than cgo, JNI, cffi/Cython/ctypes, etc. Parsing C headers, complete with comments and stuff, is super cool, and just about as slick as you can get without bringing in serious C cruft (like having its preprocessor). My biggest disappointment with Swift is that C++ doesn’t get the same treatment.
- saagarjha 8y agoC++ really is hard for any language to interop with. You basically have to add all of C++ to the language before it can work with C++.
- gok 8y agoYeah I agree it wouldn’t be easy but damn would it be great. And like... given that much of the Swift Core team implemented C++ in clang, they’d be the ones to do it.