On 24/09/2011 9:48 PM, Brian Anderson wrote:

After further contemplation, I don't understand how the ability to swap 
pointers to resource is 'the only useful way to make a resource have indefinite 
extent'.

Not swap per se, but the ability to construct a resource into a box and then move that out of the current frame somehow (move it into an existing longer-lived data structure, move it into a passed-in &, return it, etc.)

Shallow-copying a @-box holding a resource also works, though can't be done type-opaquely. In any case, without the ability to do *one* of those, you can't make a resource that outlives the frame it was constructed in.

-Graydon
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to