Fork me on GitHub
#data-oriented-programming
<
2022-01-17
>
niveauverleih08:01:58

I'm new to the idea of DOP. My question: say you have an application that keeps state in a map in an atom. When the state changes, do you always "accrete" the new value to the map with a timestamp, or do you sometimes overwrite the old value, when the use case doesn't require to keep the history of values? "The Joy of Clojure seems to imply the first "14.1.4. PLOP A place oriented programming (Hickey 2012) model is one where data representing entity state is updated in place over the data that existed previously, thus obliterating any notion of time and seriously subverting object equality...".

Yehonathan Sharvit10:01:28

I think it's OK to overwrite the old value in the atom when you use doesn't require to keep the history of values. The important thing is that the value is never mutated. Here is how we summarize it: > The data is immutable but the state reference is mutable.

yes 1