dfon Lobsters • Recommends
Introducing a Memory-Safe Successor Language in Large C++ Code Bases - John McCall - CppNow 2023
39K subscribers • 42 videos on Hallway • Conference channel
- Recommended by 4 people: 3 on Hacker News and 1 on Lobsters.
- Presented by John McCall, Swift Core Team member at Apple
- Linked in the descriptionboostcon/cppnow_presentations_2023
- An opinion. It argues one side of a question engineers disagree on.
Advanced. Deep dive for people who know the field.
18K views3 years ago4 recommendations
Programming languagesSystems programmingSwiftC++Language design and type systems
John McCall explains how to incrementally introduce Swift as a memory-safe successor language into large C++ codebases using bidirectional interoperability.
cppnow.org linkedin.com/company/cppnow --- Introducing a Memory-Safe Successor Language in Large Code Bases - John McCall - CppNow 2023 Slides: github.com/boostcon/cppnow_presentations_2023 --- Interest in memory-safe programming has never been higher, but how can you adopt it in an existing, large C++ code base without rewriting massive amounts of code at once? One tempting approach is to incrementally improve C++ by bringing the ideas from memory-safe languages back to C++. However, this path has inherent hard limitations forced by the language and library design. New languages offer the chance to start fresh with a memory-safe model, providing language affordances to make memory-safe programming the ergonomic and high-performance default. But the introduction of a new programming language in an existing code base typically requires widespread rewrites or the creation of large stub libraries. Swift is a memory-safe, multi-paradigm programming language designed from the beginning with fast, native bidirectional interoperability with the C family of languages. Swift code can be introduced into an existing code base a single file at a time, allowing large code bases to adopt incrementally, for example by implementing new features in Swift or performing targeted rewrites of problematic or safety-critical code. This talk will explore the key design aspects of Swift that make it uniquely suitable for integration into existing code bases. It will demonstrate how we’ve made use of Swift’s nascent C++ interoperability feature to bring Swift’s safety and expressiveness to large, established C++ code bases without massive rewrites. Along the way, we’ll reflect on lessons learned from our rollout of a new, memory-safe language throughout a large software ecosystem, in the hope that it can help the C++ community chart a path forward to a memory-safe future. --- John McCall John McCall has worked on programming languages at Apple for fifteen years. He is a language designer for Swift, for which he serves as the Chair of the Language Workgroup in charge of language and standard library evolution, as well as on Objective-C and many of Apple's language extensions to C. He is also a compiler and runtime implementor on both Swift and Clang and is a code owner of LLVM IR generation in both compilers. John helped bring up C++ support in Clang, including implementing core language features such as access control and exceptions. He also led the design and implementation of a number of memory safety and security features, such as automatic reference counting (ARC) in Objective-C, Apple's ABI adoption of ARMv8.3 pointer authentication in C, Objective-C, and C++, and the basic implementation design of Swift. --- think-cell develops one of the world’s leading PowerPoint applications, with C++ at the core of everything we build, from layout algorithms to deep integration with Microsoft Office. Interested in working on challengiWhy it's here
4 people recommend thisWhat people say. Recommended for its insights into language interoperability and Apple's strategy for transitioning from C++ to Swift.
pjmlpon Hacker News • Recommends
On “Show HN: C-ocoa, Write iOS/macOS apps in any language, with a generated C API”
pjmlpon Hacker News • Recommends
On “Interoperability: Swift’s Super Power”
mannuchon Hacker News • Recommends
On “Memory safety is necessary, not sufficient”
glhayneson Hacker News • Recommends
On “Swift Static Linux SDK”
pjmlpon Hacker News • Mentions
On “Show HN: C-ocoa, Write iOS/macOS apps in any language, with a generated C API”
pohlon Hacker News • Mentions
On “Interoperability: Swift’s Super Power”
stephen_gon Hacker News • Mentions
On “PostScript’s Sudden Death in Sonoma”
pjmlpon Hacker News • Mentions
On “Bare-metal Rust in Android”
pjmlpon Hacker News • Mentions
On “Apple's use of Swift and SwiftUI in iOS 17”
stephen_gon Hacker News • Mentions
On “Apple's use of Swift and SwiftUI in iOS 17”
nrron Hacker News • Mentions
On “Swift was always going to be part of the OS”
stephen_gon Hacker News • Mentions
On “Operation Triangulation: What you get when attack iPhones of researchers”
stephen_gon Hacker News • Mentions
On “Apple hiring compiler developers for improving Swift / C++ interoperability”
pjmlpon Hacker News • Mentions
On “The Case for Rust in the base system”
pjmlpon Hacker News • Mentions
On “The Case for Rust in the base system”