News for hackers. Stuff that matters.
Re:Swift and C++ interoperability workgroup announcement by favorited on Tuesday February 01, 2022 @04:03PM (#30169216)
> I wish they'd start by standardizing something equivalent to "extern C" in Swift

There is the unofficial (but very relied upon) @_cdecl, if you're OK with needing to update your code if/when that eventually gets standardized. That attribute will take care of the calling convention difference for you.

https://github.com/apple/swift/blob/main/docs/ReferenceGuide...

Re:Swift and C++ interoperability workgroup announcement by sirwhinesalot on Tuesday February 01, 2022 @06:33PM (#30171299)
I'm aware, but it's still unofficial and I've been burned by depending on such things before. Hopefully it'll become official soon.