'Swift as C++ Successor in FoundationDB' by Konrad Malawski (Strange Loop 2023)

preview_player
Показать описание
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

----
Recorded Sept 21, 2023 at Strange Loop 2023 in St. Louis, MO.
Рекомендации по теме
Комментарии
Автор

glad that swift successors keep coming, despite some initial setbacks! 🦆+ 1

mooncop
Автор

Wow really great talk! I’m coming from a JS/TS background and this was really helpful in understanding some things about both C++ (a language I’ve only a cursory understanding of) and Swift (same level), and just systems programming language concepts in general.

funkijote
Автор

The backtrace support is very impressive

guyor
Автор

I love that talk.
i never had any contact with swift - mostly because it was "apple app language" in my mind.

interesting. Maybe i have to give it a try.

but i also kinda feel like Konrad may take over the world until then :D

Chrrs
Автор

Predecessor language is C or C++? Are they forbidden to mention Objective-C?

AdrianBoyko
Автор

22:55 I like the rust lingo better - impl Trait for Struct

guyor
Автор

12:58 "lets talk little bit about language model" - flashbacks

Morimea
Автор

Nice presentation. But the code Syntax could have been larger.

chovuse
Автор

C++ interop seems simpler than C (which i think requires an ObjC bridge?)

jp
Автор

“[swift] is equally supported on other platforms” that is not entirely accurate.

michaelnajera