On 03/25/2012 02:16 AM, Gareth Smith wrote:
On 23/03/12 20:42, Graydon Hoare wrote:
- Existing vecs are always unique. Sometimes you want shared, but
boxing them as @[] causes double-indirection, feels awkward.

Apologies if I am missing the point here, but how about using some sort
of copy-on-write mechanism instead of unique pointers? So:

For sending purposes. We need to make sure that data is uniquely owned to avoid atomic reference counting and data races when sending data between tasks.

Also, we used to rely on that optimization in earlier versions of Rust, and it turned out to be hard to predict when there were outstanding references. It was a bit of a performance footgun...

Patrick
_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to