Comment by alfiedotwtf
7 hours ago
> What does explicitly writing out the heap-ness of a variable ultimately provide, that Rust's existing type system with its many heap-allocated types (Box, Rc, Arc, Vec, HashMap, etc.) doesn't already provide?
To be honest, I was thinking more in terms of cognitive overload i.e. is all that Box boilerplate even needed if we were to treat all `heap my_heap = …” as box underneath? In other words, couldn’t we elide all that away:
let foo = Box::new(MyFoo::default ());
Becomes:
heap foo = MyFoo::default();
Must nicer!
No comments yet
Contribute on Hacker News ↗