News for hackers. Stuff that matters.
Re:Why developers should be force-fed state machines by justincormack on Tuesday June 14, 2011 @07:03AM (#2652521)
Yeah, state as functions is really nice, but it gets messy in languages that don't have tail recursion elimination (eg Javascript), as you have to have a trampoline mechanism to call the next state, I generally return the new state function and get the trampoline to call it. Which is less readable then just calling the new state as in your Lua example...

There are no comments on this comment yet.