News for hackers. Stuff that matters.
Re:Clojure's missing piece (2017) by kickopotomus on Monday December 03, 2018 @01:31PM (#18591458)
A tree is a type of graph. Also, if your graph has cycles you could end up with infinite levels of nesting. Trees are simpler by definition.
Re:Clojure's missing piece (2017) by rbkillea on Monday December 03, 2018 @04:12PM (#18593077)
I think that the distinction that dustingetz was trying to make is related to the fact that trees are graphs. Many applications naively nest data in tree structures with links from nodes to other nodes that are implied by the data. Maps are powerful enough to represent arbitrary graphs, so if you don't take advantage of this you end up with a lot of duplicated data in tree format. Then you need to do a bunch of tree traversals to link the data to itself at query time.
Re:Clojure's missing piece (2017) by dustingetz on Monday December 03, 2018 @08:17PM (#18594951)
graphs are more general! we could argue which is simpler. Graphs store data in normal form. Trees are denormalized.