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

Just to add to your explanation, Lisp cons cells works that way as well, and are implemented as linked list.

The great and often unmentioned pro of cons cells/linked lists is that they are a very simple form of persistent data structure, that make immutability and memory sharing very easy, so are an excellent primitive to build a garbage-collected immutable and shared-nothing language upon like Erlang, or Clojure.



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

Search: