Skip to content

Instantly share code, notes, and snippets.

@ardbytes
Created May 21, 2013 19:04
Show Gist options
  • Save ardbytes/5622344 to your computer and use it in GitHub Desktop.
Save ardbytes/5622344 to your computer and use it in GitHub Desktop.
Important Clojure concepts
* Immutability
- Persistent data-structures. Once created, cannot be changed.
- All modifications result in a new data-structure being created.
- New data-structures are efficiently created from old ones through structural sharing.
* Identity
- Identity is logical.
- Changes over time. For example, Kaveri River.
* State
- Is a snapshot of an identity at a given time. Hence, is immutable.
* Time
- Time in a system is relative to observable events.
- Imperative programming languages allow mutable state making concurrent programming difficut.
- Clojure separates object's state from its identity making it suitable to handle concurrent events.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment