3 ms·
Yes, that makes a lot of sense. The ownership would be linear: struct Graph { nodes: Vec<Node>, edges: Vec<Edge>, } but the associatio
by DougBTX 6y ago
Yes, that makes a lot of sense. The ownership would be linear:
struct Graph {
nodes: Vec<Node>,
edges: Vec<Edge>,
}
but the associations between nodes would have an arbitrary structure.
The article suggests that handles are better than references anyway (I'd tend to agree in this case) so Edge would be a pair of handles. That seems totally fine, so maybe the "fatal flaw" is overstated...