4 ms·
> There is no concept of time in pure functions. Very true, but there is a fundamental concept of time, almost by definition, in game-worlds. Whereas in imper
by craigsmansion 9y ago
> There is no concept of time in pure functions.
Very true, but there is a fundamental concept of time, almost by definition, in game-worlds.
Whereas in imperative programming it's true that one actor always arrives first in computation, he might not have arrived first "in the game": conflict resolution is still a necessity.
As such I don't think this is a problem that only occurs in functional programming.
It's my impression that it's the events up to any conflict are much cleaner to express functionally.
- crimsonalucard 9y agoCorrect. But when things arrive at the same time and the same place "in game" the imperative programming style resolves this automatically by giving precedence to the object that was computed first, thus this problem is handled automagically in the imperative world. In fact you probably don't even have to really think about this issue when using the imperative style, unlike the functional style where this issue must be explicitly dealt with. FYI I'm not saying either paradigm is worse or better, it is what it is.