2 ms·
You don't have to save versions of everything because your functions are pure, so you just save your inputs and you can recompute what happened.
by lmm 12y ago
You don't have to save versions of everything because your functions are pure, so you just save your inputs and you can recompute what happened.
- seanmcdirmid 12y agoI saw the demo yesterday; it looked like you still had state in the form of a world value (at least storing Mario's physical state information). Those world values would have to be kept around. Elm code is only pure in that it doesn't have implicit side effects, it definitely has state. However, if you have deterministic execution, you can always just re-execute from the beginning to get the same execution. This works for functional and non-functional code.
- rfergie 12y ago> ... if you have deterministic execution ... Is deterministic execution the same as referential transparency? I think what you are saying is that you get the benefit of a functional language when you use a functional style regardless of the language.
- seanmcdirmid 12y agoNo, as long as multi threading isn't involved and event streams are replayed in order, execution is generally deterministic.