Re:Functional, stateless JavaScript finite state machines an...
by bandrami on Monday November 19, 2018 @02:00PM
(#18488765)
I'm missing what value the word "stateless" adds to this description, and the article didn't help
[ Parent
| on HN ]
Re:Functional, stateless JavaScript finite state machines an...
by jbeard4 on Monday November 19, 2018 @02:12PM
(#18488849)
It means state is passed in as a parameter to the state machine interpreter - as opposed to being contained in the interpreter object. This is helpful when building pure functional systems, where state is passed in from some external data store, like in Redux reducers.
Re:Functional, stateless JavaScript finite state machines an...
by davidkpiano on Monday November 19, 2018 @02:17PM
(#18488883)
Thank you - this is correct (the interpreter is impure). It also makes it possible to create your own custom interpreters.
Also, your work has been a huge influence on XState, and I can't thank you enough for SCION!
Re:Functional, stateless JavaScript finite state machines an...
by jbeard4 on Monday November 19, 2018 @02:22PM
(#18488914)
Thanks!