In the context of functional programming which is the correct term to use: persistent or immutable? When I Google “immutable data structures” I get a Wikipedia link to an article on “Persistent data structure” which even goes on to say:
such data structures are effectively
immutable
Which further confuses things for me. Do functional programs rely on persistent data structures or immutable data structures? Or are they always the same thing?
A persistent data struture preserves only the previous version of itself after a change. Depending on the type of persistent data structure…you may or may not be able to modify previous versions.
An immutable type can not be changed at all.
Functional Languages primarily rely on Immutable types (also called values) for their data storage (even though you can use Mutable types in some…but it has to be done explicitly).