- aliasing, regions, uniqueness, and immutability in Rust
slides (to come)
Systems programming requires unfettered access to memory and predictable, low-cost abstractions. As such, garbage collection is impractical. However, years of experience have shown that programming in a memory unsafe language (such as C or C++) results in subtle and hard to find bugs, often with severe implications for security. Rust solves these constraints using static type checking. Rust's type system tracks aliasing and prevents memory leaks, dangling pointers, use-after-free errors, data races, and other sources of memory unsafety, all without run-time overhead.
In this talk, I will give a brief overview of Rust's syntax and semantics; describe Rust's system of alias control - borrowed references, explicit lifetimes, unique pointers - and its implementation; show how these features conspire to ensure memory safety, including in a multi-threaded environment; show how uniqueness and mutability are coordinated to prevent data races and make programs easier to reason about; and show how the type system can be safely circumvented using dynamic checking, where necessary.