4 ms·
C++ is hardly niche, nor I would say is the desire to interop with large, established languages with decades of existing code and libraries. As someone who has
by wrasee 2y ago
C++ is hardly niche, nor I would say is the desire to interop with large, established languages with decades of existing code and libraries.
As someone who has worked in both Swift and C++ I’m grateful for those that choose to make an effort in this space. And of course, just because some do doesn’t take away from others that work on SwiftUI. Both can be true at the same time.
- quietbritishjim 2y agoAgreed that C++ FFI is not niche, although it's also not really a core feature (C FFI suffixes for that). Safe FFI with lifetime support is definitely lower priority though, given that FFI is usually in a thin layer of application code that can sort out safety itself.
- Someone 2y ago> given that FFI is usually in a thin layer of application code that can sort out safety itself. Apple is aiming far higher. They want [1] the ability to seamlessly replace C++ code anywhere with Swift code, to write subclasses of C++ classes in Swift, etc. without giving up performance. See https://github.com/swiftlang/swift-evolution/blob/main/visions/using-swift-from-c%2B%2B.md#goals https://github.com/swiftlang/swift-evolution/blob/main/visio... and the video linked to in https://forums.swift.org/t/video-swift-as-c-successor-in-foundationdb/67823 https://forums.swift.org/t/video-swift-as-c-successor-in-fou..., which shows how far they were a year ago. [1] they likely won’t get there for all C++ code, but if they get to “with a few manual annotations” without giving up efficiency, that would be a major accomplishment.