3 ms·
Agreed 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 pr
by quietbritishjim 2y ago
Agreed 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.