As I understand it, Clojure does things in the background so that returning new data instead of changing mutable data in place isn't a big drag on performance and garbage collection. Do all lisps do this? Like can you work with Common Lisp or Racket in this way or am I incorrectly assuming similarities because they are also lisps? (disclaimer: have tried neither CL or Racket)
that understanding is not correct
clojure's primary data structures are implemented as trees, for sharing the structure of the tree between versions of the data structure, which gives you immutable data structures with better performance than naive copy on write
there is no "doing things in the background"
a lot of other languages have libraries these days that provide similar data structures
(the kind of tree clojure uses for the most part is a hash array mapped trie)
Oh ok, thank you for the clarification. So basically Clojure was built to do this and other lisps may not be, although libraries could be available
yes
thank you!
there is a nice paper from the recent history of programming languages conference https://download.clojure.org/papers/clojure-hopl-iv-final.pdf
What I thought would be a simple matter of shopping for
best-of-breed functional data structures ended up being a search and engineering exercise that
dominated my early Clojure work, as evidenced by the gap in commits during the winter of 2006/7
(figure 2). which is eventual what lead to him settling on hamts, created by, uh, Phil Bagwell I think
https://quickref.common-lisp.net/cl-hamt.html looks like a common lisp library, and https://docs.racket-lang.org/hamt/index.html is one for racket
Good stuff, I had just found the Racket one as well when you posted, now that I know what I am looking for. And thanks for the link to the paper. Will read that