4 ms·
> How do you express as a DAG a tree where nodes need to keep references to their children and parents? Rewrite your program in a form where it does not contai
by ReflectedImage 4y ago
> How do you express as a DAG a tree where nodes need to keep references to their children and parents?
Rewrite your program in a form where it does not contain a tree.
If you want an actual tree as a data structure, see the trees crate.
> Rust is not Forth. I can write whatever I want and there's nothing wrong with that.
And other people write Haskell code in Python :p. If your code style doesn't match the language you are using you are going to have a lot of unnecessary friction.
- scotty79 4y agoI think Rust is flexible enough to still work very well with my style. But you inspired me about something. I think I can rewrite the program that I am writing to use reverse Polish notation instead of a tree. Thanks!
- ReflectedImage 4y agoGood luck!