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

Ғылым және технология

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.com

Пікірлер: 16

  • @lwouisYT
    @lwouisYT9 ай бұрын

    Great presentation, thank you!

  • @mooncop
    @mooncop9 ай бұрын

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

  • @guyor4761
    @guyor47619 ай бұрын

    The backtrace support is very impressive

  • @gofudgeyourselves9024
    @gofudgeyourselves90248 ай бұрын

    Rust language founder also worked on swift

  • @Ch0rr1s
    @Ch0rr1s9 ай бұрын

    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

  • @evoboy67

    @evoboy67

    9 ай бұрын

    I recommend learning Swift, at least play with it and get to know some of the language concepts and decisions in Swift. It’s pretty neat IMHO, from things like progressive discourse and safety by default to having clear and easy distinction between reference and value types and semantics, abstract generic algorithms and protocol oriented programming. Swift and Rust have many things in common, e.g safety by default, but some key decisions in the Swift Language make it so much more expensive while reducing complexity compared to Rust, e.g an easy foot gun is accidentally creating leaky abstractions. It’s worth to mention my bias, my nerdy heart finds it rather beautiful language ❤ just take a look at the standard library, e.g protocols like Sequence and Numeric

  • @AdrianBoyko
    @AdrianBoyko9 ай бұрын

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

  • @pinkorcyanbutlong5651

    @pinkorcyanbutlong5651

    9 ай бұрын

    we don't speak of objective-c

  • @robchr
    @robchr6 ай бұрын

    Are they using Swift in the Kernel?

  • @guyor4761
    @guyor47619 ай бұрын

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

  • @chovuse
    @chovuse9 ай бұрын

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

  • @Morimea
    @Morimea8 ай бұрын

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

  • @JamesPower
    @JamesPower6 ай бұрын

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

  • @michaelnajera7958
    @michaelnajera79588 ай бұрын

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

  • @encapsulatio

    @encapsulatio

    7 ай бұрын

    Can you elaborate? Just how worse is developing in Swift on Linux? What about successfully cross compiling Sift software on Windows, Linux, Android?

  • @marcinkliks6522

    @marcinkliks6522

    7 ай бұрын

    It has the same release train for all platforms and they all receive all the patches. There are some differences between platforms but it’s not a big deal imo

Келесі