Explores potential features for Rust programming language, examining two specific proposals: fields in traits (which would allow trait-defined data fields with polymorphic access) and self-referential structs (enabling structs where one field borrows from another). The author evaluates fields in traits as potentially useful but not essential, while strongly advocating for self-referential structs as addressing a significant gap in Rust's current capabilities. The discussion includes technical implementation details, limitations, and how these features would interact with Rust's existing borrow checker and type system.
1 Comment
Sort: