News for hackers. Stuff that matters.
Re:Unsoundness in Pin by jimmaswell on Friday November 29, 2019 @12:53PM (#21665776)
So the main use is convenience to seamlessly make stack variables permanent? Intuitively that doesn't sound worth the language design troubles compared to making the programmer declare these things on the heap manually. I'm not that familiar with Rust though.
Re:Unsoundness in Pin by steveklabnik on Friday November 29, 2019 @01:02PM (#21665826)
That’s one use case, it’s not the only one. And it’s not always “put it on the heap”, so you can’t solve the issue that way.
Re:Unsoundness in Pin by kibwen on Friday November 29, 2019 @02:37PM (#21666319)
Ideally it should be possible to avoid the heap entirely; futures in Rust should be capable of operating even in contexts that don't come with a memory allocator, such as memory-constrained embedded devices.