Overview
Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
Explore the concept of subtyping in Rust and its connection to Arthur C. Clarke's Third Law in this 54-minute conference talk by Felix Klock. Delve into the intricacies of Rust's subtyping system, learning where it exists and how it differs from expectations. Gain insights into variance, mutable references, unsafe cells, and automatic borrowing. Discover why subtyping in Rust can be considered "magical" and when it becomes crucial in complex data structure development. Engage with examples, deduction rules, and a pop quiz to reinforce your understanding of this advanced Rust topic.
Syllabus
Intro
Subtyping
Sanity Check
What is Subtyping
Integer to Integer Examples
Integer to Ceiling Examples
Java
Deduction Rules
Contravariance
Does Rust have variants
A magic trick
Rust Subtyping
mutable references
unsafe cell
duck subtyping
coercion
automatic borrowing
dereferences
pop quiz
variance
Taught by
Rust