We need (at least) ergonomic, explicit handles
8 hours ago
- #Ergonomics
- #Rust
- #Reference Counting
- The article discusses whether Rust should require explicit invocation of handle/clone for ergonomic reference counting (RC).
- Dioxus advocates for not requiring explicit handle/clone calls in high-level GUI applications, considering it unnecessary noise.
- The author argues for making it ergonomic to be explicit, aligning with Rust's philosophy of giving control while maintaining usability.
- Explicit handle creation is important for performance, memory usage, and correctness in low-level applications.
- Rust's explicitness helps avoid surprises and debugging challenges, such as tracking reference counts and memory leaks.
- Examples from Swift and the 'bytes' crate illustrate the benefits of explicit handle creation for debugging and resource management.
- The article highlights Rust's versatility, aiming to be suitable for both low-level (e.g., kernel) and high-level (e.g., GUI) use cases.
- The author suggests starting with explicit handles and later considering automatic cloning if needed, prioritizing explicitness first.
- The discussion emphasizes Rust's soul: balancing low-level control with high-level usability, avoiding artificial simplicity.