5 ms·
He probably means something like this: http://debug.elm-lang.org/ http://debug.elm-lang.org/
by Dewie 12y ago
He probably means something like this:
http://debug.elm-lang.org/ http://debug.elm-lang.org/
- seanmcdirmid 12y agoYou really don't get that for free though, since you saved versions of everything you'd quickly exhaust the heap. Also, one could bother with delta checkpointing (only copy dirty pages) to get something like this in an imperative language, or build a programming model especially suited for it [1]. Functional programming doesn't really make this much easier (even if you use persistent data structures). [1] http://research.microsoft.com/en-us/people/smcdirm/managedtime.aspx http://research.microsoft.com/en-us/people/smcdirm/managedti...
- lmm 12y agoYou 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.
- Dewie 12y ago> You really don't get that for free though, since you saved versions of everything you'd quickly exhaust the heap. Why would you save versions of everything? That sounds like a pessimistic strategy that you would need in a stateful environment where anything can be destructively updated at any time, which doesn't apply in this case. > , or build a programming model especially suited for it [1]. Sorry if I don't take the claim "especially suited for it" at face value, seeing as you are the co-author and you are criticizing something which seems to try to achieve the same thing in a different manner. Maybe that's unfair of me.
- orclev 12y agoYeah, on the topic of [1], that's basically FRP in a different wrapper and using different terminology. Fundamentally there's little difference between the two approaches, you're just hiding some of the details that FRP normally exposes.
- seanmcdirmid 12y agoIt's FRP without event streams or signals. So basically, it's not FRP. Or if you think everything reactive is frp, I guess.