News for hackers. Stuff that matters.
Re:Safe and efficient C++ interoperability via non-escapable... by quietbritishjim on Thursday November 14, 2024 @07:36AM (#42135620)
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.

Re:Safe and efficient C++ interoperability via non-escapable... by Someone on Thursday November 14, 2024 @10:20AM (#42137024)
> 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/visio...

and the video linked to in 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.