Description
When working with FSM implementations, we need a marker type used to denote current changes and inform about state changes when required. In standard (non-persistent) FSM implementation, the common practice is to use enums for this, (see: standard FSM).
However, when it comes to PersistentFSM
s, for some reason, we are required to rely on type which implements a PersistentFSM.IFsmState. Current examples usually implement it by several different singleton classes, which only contract is ability to provide unique string identifier - essentially an enum's ToString
equivalent.
Implementing several singletons here seems to be overkill and probably a result of trying to fit too closely to native Scala API. This is also horrible from F# API point of view. The idea here is to obsolete IFsmState
and family and loose the PersistentFSM constrains, so that ordinary values could be used, just like in case of non-persistent FSMs.