mannuchon Hacker News • Recommends
On “Memory safety is necessary, not sufficient”
#foundationdb#swift-c-interop#memory-safety
88K subscribers • 107 videos on Hallway • Conference channel
Intermediate. Assumes working knowledge.
19K views3 years ago3 recommendations
Programming languagesDatabases and dataSwiftC++Database internals
Konrad Malawski explains how the FoundationDB team incrementally adopted Swift into their C++ codebase using Swift's C++ interoperability features.
Programming languages often prioritize either performance or ergonomics. Swift offers a unique modern type-safe low-ceremony approach taking the best of both worlds that scales from mobile apps to high-performance systems where previously memory-unsafe languages would be used. It also interoperates seamlessly with C and C++. In this talk, we show how we successfully adopted Swift in FoundationDB, a distributed database struggling to modernize its C++ codebase. Swift's interoperability features allowed the team to incrementally move single functions, or entire types, to Swift. This transition was done without generating any bindings and while preserving the existing semantics. FoundationDB uses a custom actor runtime, which enables reproducible simulation testing. Again, Swift's flexible concurrency and distributed actor model enabled an incremental side-by-side approach by having Swift concurrency seamlessly execute on the existing scheduling infrastructure. Konrad Malawski Swift Team, Apple @ktosopl Konrad works in the Swift team at Apple, where he focuses on foundational server-side Swift libraries and concurrency features of the language. He was part of the design and implementation of Swift’s structured concurrency and actor model, as well as the distributed actors language feature and cluster library. He also maintains server-side observability libraries for logging, metrics and distributed tracing. Previously, he worked on Akka at Lightbend/Typesafe, where he maintained core pieces of the ecosystem, including the clustering, event sourcing, streaming and HTTP libraries. He also made significant contributions to the reactive-streams specification and TCK which later became the foundation of the JDK’s java.util.concurrent.Flow types. ---- Recorded Sept 21, 2023 at Strange Loop 2023 in St. Louis, MO. thestrangeloop.comWhat people say. Recommended for its detailed look at Swift's C++ interoperability and its practical application in a large systems codebase.
mannuchon Hacker News • Recommends
On “Memory safety is necessary, not sufficient”
glhayneson Hacker News • Recommends
On “Swift Static Linux SDK”
cube2222on Hacker News • Recommends
On “Ladybird browser to start using Swift language this fall”
pjmlpon Hacker News • Mentions
On “Apple's use of Swift and SwiftUI in iOS 17”
sandyarmstrongon Hacker News • Mentions
On “9 years of Apple text editor solo dev”
frankjron Hacker News • Mentions
On “Apple hiring compiler developers for improving Swift / C++ interoperability”
Someoneon Hacker News • Mentions
On “Swift 6”
pjmlpon Hacker News • Mentions
On “Apple’s Darwin OS and XNU Kernel Deep Dive”
pjmlpon Hacker News • Mentions
On “FoundationDB: From idea to Apple acquisition [video]”