Data structures Quote by Chris Okasaki
““A distinctive property of functional data structures is that they are always persistent—updating a functional data structure does not destroy the existing version, but rather creates a new version that coexists with the old one. Persistence is achieved by copying the affected nodes of a data structure and making all changes in the copy rather than in the original.””
About This Quote
Source Book: Purely Functional Data Structures, 1998
Functional data structures keep old versions intact by creating new copies on updates, ensuring persistence.
In simple terms: Updates don’t erase old data; they create a new version.
Use immutable structures for reliable versioning.
Themes
Mood
Type
When to use this quote
- software development
- database snapshots
- undo features
- collaborative editing
Key Concepts
Questions to Reflect On
- How does persistence affect performance?
- When is immutability essential?
Copying nodes can increase memory usage.