ClojureScript: Up and Running by Stuart Sierra & Luke VanderHart

ClojureScript: Up and Running by Stuart Sierra & Luke VanderHart

Author:Stuart Sierra & Luke VanderHart [Stuart Sierra and Luke VanderHart]
Language: eng
Format: epub, pdf
Tags: COMPUTERS / Programming Languages / JavaScript
ISBN: 9781449327385
Publisher: O'Reilly Media
Published: 2012-10-24T16:00:00+00:00


Identity and State

Having data structures be immutable values is all very well, but it opens another question: if values are immutable, then how does ClojureScript model state and change over time? After all, not every program can be a purely functional transformation of inputs to outputs. Most of the time, programs need to store and change values.

The answer lies in ClojureScript’s (and Clojure’s) conceptual distinctions among value, identity, and state.

A value is, as the name implies, an immutable value. As discussed above, values can’t change, by definition.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.