Generators with UnpinCell
UnpinCell wrapper type could solve generators' self-referential value problem by enabling pinned references to work with existing traits like Iterator.
Rust language team member. Worked on async/await in Rust. Writes about programming language design.
https://without.boatsUnpinCell wrapper type could solve generators' self-referential value problem by enabling pinned references to work with existing traits like Iterator.
A new design for pinned places in Rust that avoids "pinned fields" and instead uses a more consistent approach with Rust's existing features.
Rust's Pin type was designed as a minimal library solution without language support to ship async/await faster, but proved more confusing than expected.
Pin is a foundational but misunderstood part of Rust's async system that prevents self-referential structs from breaking when moved in memory.
Programming languages use "ownership" as a metaphor to make substructural type theory accessible to programmers unfamiliar with advanced concepts.