Wednesday
Room 1
11:40 - 12:40
(UTC+02)
Talk (60 min)
Part 1: Introducing Carbon's Memory Safety Model
The Carbon programming language is designed as a successor to C++. One of our primary motivations in recent years has been to enable the smooth introduction of memory safety into existing, large-scale C++ codebases and systems. In general, new languages must have a path to memory safety, as memory unsafe languages are increasingly an unsustainable risk for the industry. However, when we announced Carbon we did not have a concrete memory safety design in mind, and a major concern was whether we could add one later once the core language had already been designed, and whether we could provide a significantly more smooth and incremental path to adopting memory safety when starting from existing modern C++ than current languages provide.
Over the last year and a half, we have worked to build a concrete memory safety design to address these concerns. The result is a memory safety model that is capable of expressing common C++ code patterns, supports C++ interop, and allows the transition to memory safety to be performed incrementally in existing codebases. This talk introduces the model and mechanisms used to detect and prevent use-after-free and cross-thread data races at compile time, without requiring exclusivity for mutable pointers or splitting apart C++ data structures. The safety model also integrates with all of the Carbon features used to support migrating C++ code such as inheritance, function overloading, and specialization. We'll also cover Carbon's permissive mode, a stepping stone on the way to strict mode, that allows migrating to Carbon separately from adding the safety annotations needed for strict checking of memory safety.

