3 ms·
Maybe a pointer is better described as equivalent to a half-edge?
by alanbernstein 3y ago
Maybe a pointer is better described as equivalent to a half-edge?
- andyferris 3y agoI think this might be kinda right. Take rust. Tree edges use Box, and DAG edges use Arc or Rc. Rust doesn’t really help with building non-DAG graphs as native data types - you can drop back to using “handles” for more generic graphs. And I actually think that is kinda fair. Languages and standard libraries should support trees and DAGs out of the box. Perhaps Hillel is right that more complex graphs should be in a user-space library or something.