3 ms·
There are many many many ways you can express something and it's very likely that one of those ways is a DAG. The issue here is that you are writing C++ code r
by ReflectedImage 4y ago
There are many many many ways you can express something and it's very likely that one of those ways is a DAG.
The issue here is that you are writing C++ code rather than Rust code.
- scotty79 4y agoHow do you express as a DAG a tree where nodes need to keep references to their children and parents? Two separate synced trees? Is it worth it? > The issue here is that you are writing C++ code rather than Rust code. How dare you! I'm writing TypeScript code! ;-) Rust is not Forth. I can write whatever I want and there's nothing wrong with that.
- 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!