[rust-dev] On Copy = POD

Cameron Zwarich zwarich at mozilla.com
Sat Jun 21 16:02:11 PDT 2014


On Jun 21, 2014, at 2:15 PM, Nick Cameron <lists at ncameron.org> wrote:

> Ownership does not always work, graphs often appear in programming. When they do, you have to use Rc or Gc to cope. We shouldn't punish programmers who have these problems to deal with. Telling them to use ownership is pointless if your data is not hierarchical. In this situation, we are not encouraging users to use ownership instead of ref counting, we are encouraging them to use garbage collection, even when that is not the optimal solution for their problem.

Rust doesn’t actually have a solution for general graph data structures besides “store the vertex data in arrays and pass around indices”. In many cases you can’t use Rc/Weak. I think this will be a significant limitation of Rust going forward.

Cameron


More information about the Rust-dev mailing list