Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The LISP people were right to make trees essentially a first class data structure.


Lists, technically, but nestable lists are indeed basically trees.


The problem with lists as tree is that there is no universal way to distinguish a:{ b c:d } from a:{ b:(c d) } which is why we need proper maps as first class citizen for "the next lisp"


Clojure does have maps as a first class citizen (besides sets, vectors and lists). Then there is clojure.walk and other namespaces suitable for tree manipulation. https://clojure.org/api/cheatsheet

Using trees of these collections is quite customary in Clojure - on the front-end you might keep the application state in a single atom, like re-frame does and update various branches of it using events/ effects and listening on changes to those branches using subscriptions. This approach work for us at orgpad.com quite well.


Yet what we really need is nested MAPS as first class data structure:

a{ nested:tree with:{lots-of:data and:more}}





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: