Hacker News new | past | comments | ask | show | jobs | submit login

I 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.




> ... 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.


No, as long as multi threading isn't involved and event streams are replayed in order, execution is generally deterministic.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: