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

I'm not sure how it's implemented in Ferret but Clojure's data structures are implemented as trees so there's structural sharing that happens when a vector or hash map is updated or when a new version is produced.

So the whole data structure isn't copied but only the relevant parts are added / updated in the tree and the rest is shared with the "new" data structure.

Mutable data structures are still more memory effective but I'm assuming its fine since the author has a blog post on using ferret on an Arduino Uno which has 32k of ram. https://nakkaya.com/2017/02/15/bare-metal-lisp-rc-control-us...

Clojure data Sturucture links: Persistent Vectors http://hypirion.com/musings/understanding-persistent-vector-...

Video with Rick hick on them https://youtu.be/wASCH_gPnDw?t=1742



It's so interesting watching Rich talk. He has such a breadth and depth of knowledge and you can tell that he really took his time when designing the language.




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

Search: