4 ms·
Trees are easy in Rust. It's graphs that are harder.
by taktoa 8y ago
Trees are easy in Rust. It's graphs that are harder.
- littlestymaar 8y agoGit “trees” are graphs though, since you have merge commits.
- FullyFunctional 8y agoMore to the point, they are DAGs. Git objects cannot form a loop, thus they are acyclic. </pedantic>
- littlestymaar 8y agoThat's absolutely correct. And your emphasis on this is on point, since DAG are relatively easy to implement in Rust: You just need to use ref-counting (instead of plain `Box` for a Tree) whereas general purpose graphs are harder to implement (and can lead to run-time bugs if node deletions aren't managed properly).