This post explains how substructural type theory is applied in programming language design, focusing on the concept of 'ownership' as seen in Rust. It discusses how type systems uphold safety and liveness properties, categorizes types based on structural rules, and elaborates on affine and linear types. It highlights Rust's current implementation nuances and suggests potential improvements such as the inclusion of linear types and the removal of the E0509 error. Shared ownership and references are also covered, detailing their implications for memory safety and aliasing.

14m read timeFrom without.boats
Post cover image
Table of contents
Type systems and correctness propertiesWhat are substructural types?Linear types and session typesE0509Shared ownership and referencesConclusion

Sort: