4 ms·
(Talking about FP, but mainly aout Haskell and other languages with some weak OOP tools) The statefulness is managable in FP generally, you could see things li
by rtpg 10y ago
(Talking about FP, but mainly aout Haskell and other languages with some weak OOP tools)
The statefulness is managable in FP generally, you could see things like the State monad in Haskell. After all, the current state is just recursive applications of the rules. Experienced users of the FP languages will feel at home
The high nesting that would end up in your data will probably mean you want to reach for deep data accessors and the like. This is managed through things like Lenses in Haskell. But that's an extremely high learning curve to basically get what you get for free with dot notation in so many other languages. If you're experienced in the language already, it's fine, but if you're just starting out in the FP language, and you had experience in iterative-style languages... ouch.
I really like the idea of applying MVC for game patterns. it makes so much sense! Going to explore that the next time I have the chance.
- clock_tower 10y agoHow is the current state just recursive application of the rules, if the rules integrate randomness? It would mean saving every call to rand(), as well as every piece of user input...