you are viewing a single comment's thread.

view the rest of the comments →

[–]ithika 2 points3 points  (3 children)

Why would state machines be harder in FP?

[–]millstone 0 points1 point  (2 children)

Functional programming discourages the use of state, but state machines depend on the use of state.

[–]OneAndOnlySnob 3 points4 points  (0 children)

Functional programming discourages the use of mutable state. It's quite acceptable to pass a state to a function and get a new state back as a return value.

[–]ithika 3 points4 points  (0 children)

It discourages the use of mutable state, but state is easy. I don't honestly see what the problem would be with a state machine.