Hacker News new | ask | show | jobs
by thought_alarm 2096 days ago
I suppose if Swift can only interoperate with C APIs, Win32 would be the only option.
1 comments

Well, Swift uses LLVM, so it's possible to link it to C++ code with extern "C" declarations.
According to this document, direct C++ interop will soon be done without the need of extern "C" wrappers. [0]

[0] https://github.com/apple/swift/blob/master/docs/CppInteroper...

That's as they say, not even wrong. :-D

The C ABI is stable. Any (normal) C compiler and a bunch of compilers of other languages can produce blobs which can be linked with each other, and by extension with C++ code with extern "C" declarations.