"Swift as C++ Successor in FoundationDB" by Konrad Malawski (Strange Loop 2023)
Why Hacker News recommends it
HN commenters recommend it as the main resource on Swift as an incremental successor to C++ and on how the interoperability works in practice.
What it is
Konrad Malawski's Strange Loop 2023 talk shows how the FoundationDB team adopted Swift incrementally in a C++ codebase. It covers Swift's C++ interoperability, which let them move single functions or entire types over one at a time.
Recommended by 3 HN commenters across 3 different months, 2023 to 2025.
What Hacker News said
Recommends mannuch · 2023-12 · on “Memory safety is necessary, not sufficient”
I wonder what the author thinks about Swift’s new C++ interop story? Since the Swift compiler includes Clang, and can thus compile both your C++ and Swift into LLVM IR, without the need for an FFI later between the two, couldn’t this be the “Typescript for C++” that the author points out a space for? The Swift folks are very much thinking about Swift as a C++ successor that can be incrementally migrated to so I’m a bit surprised the author didn’t discuss it further — especially given Swift’s spiritual similarities to Rust. There’s a couple great talks on this by folks on the Swift team. John McCall at CppNow [LINK] Konrad Malawski at StrangeLoop 2023 [this video]
Recommends glhaynes · 2024-06 · on “Swift Static Linux SDK”
I'm not a (direct) user of the C++ interop, but everything I've heard about it has been quite positive. A few hopefully relevant resources, first a couple of videos: - "Introducing a Memory-Safe Successor Language in Large C++ Code Bases" (John McCall; CppNow 2023) [LINK] - "Swift as C++ Successor in FoundationDB" (Konrad Malawski; Strange Loop 2023) [this video] And then a series of blog posts by Doug Gregor: - "Swift for C++ Practitioners" [LINK] And finally: - "Mixing Swift and C++" (Swift.org) [LINK]
Recommends cube2222 · 2024-08 · on “Ladybird browser to start using Swift language this fall”
Honestly, Swift seems like such a nice language. Most of the performance and power, great interop, but more directed at application development than Rust (with e.g. refcounting being the default). But as they say, you choose a language for its ecosystem, not for the language itself. It would be great if Swift’s open source ecosystem for stuff other than app development grew. It does indeed seem like Apple is pushing for it with stuff like Swift for embedded. The fairly recent presentation about starting to move FoundationDB to Swift[0] was also very interesting. A follow-up on that at some point would be quite interesting to see too, and would inspire confidence if the process is going well.
Cites pjmlp · 2023-10 · on “Apple's use of Swift and SwiftUI in iOS 17”
On the same subject, some talks from Apple folks, "Introducing a Memory-Safe Successor Language in Large C++ Code Bases" [LINK] "Swift as C++ Successor in FoundationDB" [this video]
Cites sandyarmstrong · 2024-01 · on “9 years of Apple text editor solo dev”
Yup, exactly. Swift was specifically designed to replace Objective-C and C++ throughout Apple codebases (see [this video] ). C# is a totally different story.
Cites frankjr · 2024-01 · on “Apple hiring compiler developers for improving Swift / C++ interoperability”
A lot of details on the interoperability also in the recent talk "Swift as C++ Successor in FoundationDB" at Strange Loop 2023. [this video]
Cites Someone · 2024-09 · on “Swift 6”
> I’d be interested to know how good this integration is in practice I haven’t used it, but from looking at the long) video at [this video] (discussed in [LINK] ), it looks pretty good.
Cites pjmlp · 2025-04 · on “Apple’s Darwin OS and XNU Kernel Deep Dive”
Yes, Apple themselves, apparently folks wanting Apple to use Rust don't read Apple's documentation or watch talks done by Apple compiler developers. > Swift was designed from the outset to be safer than C-based languages, and eliminates entire classes of unsafe code. -- [LINK] > Swift is a successor to the C, C++, and Objective-C languages. It includes low-level primitives such as types, flow control, and operators. It also provides object-oriented features such as classes, protocols, and generics. -- [LINK] "Introducing a Memory-Safe Successor Language in Large C++ Code Bases" [LINK] "So we feel pretty strongly, obviously at Apple our sucessor language is Swift and I am here to talk about f