News for hackers. Stuff that matters.
Re:On Apple's Love Affair with Swift by gok on Saturday August 11, 2018 @08:53PM (#17742346)
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.
Re:On Apple's Love Affair with Swift by saagarjha on Saturday August 11, 2018 @09:18PM (#17742439)
C++ 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++.
Re:On Apple's Love Affair with Swift by gok on Saturday August 11, 2018 @09:20PM (#17742453)
Yeah 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.