top | item 39831812

(no title)

fhood | 1 year ago

I think it's best to think of this as a good toy example, and not get caught up in the specific utility of a "parent" node.

discuss

order

worik|1 year ago

It is just a bad example.

One of the main points is that there are very few algorithms that require back links that create cycles.

Cyclic data structures, rare as they are, are also hard to reason about. Even for garbage collectors!

If you have to implement one in Rust (I have) it is a bother, a big hassle.

It is a good thing that in the general case when a programmer is implementing back links they are doing the Wrong Thing.