Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What defines a "persistent" data structure in Clojure?

Tags:

clojure

The http://clojure.org/data_structures page explains all Clojure collections as being "immutable and persistent". I have been looking for a clear definition of exactly what "persistent" means in this instance and whether anybody has a clear explanation of this?

like image 516
insudo Avatar asked Jan 28 '26 03:01

insudo


1 Answers

It refers to the same kind of persistent as this wikipedia article. Summarized:

In computing, a persistent data structure is a data structure that always preserves the previous version of itself when it is modified. Such data structures are effectively immutable, as their operations do not (visibly) update the structure in-place, but instead always yield a new updated structure. (A persistent data structure is not a data structure committed to persistent storage, such as a disk; this is a different and unrelated sense of the word "persistent.")

like image 60
August Lilleaas Avatar answered Jan 30 '26 20:01

August Lilleaas



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!