Is anyone using any Kotlin state machine libraries? any recommendations?
08/27/2021, 3:57 PM
You can use sealed classes/interfaces to make a state machine, no need of libraries
08/27/2021, 3:58 PM
That’s what I’m currently doing, but I’m wondering if there’s something that will help with state transitions
For instance defining which transitions are allowed
08/27/2021, 4:00 PM
You can use sealed classes and each class can implement allowed/not allowed interface
08/27/2021, 10:39 PM
Implementing the FSM manually will inevitably lead to a lot of boilerplate in your sealed classes that obscure the actual intent or structure of the FSM.
Tinder has a JVM-only FSM library that's pretty good https://github.com/Tinder/StateMachine
08/30/2021, 3:09 PM
Thanks for responding… I saw that actually! Didn’t realize Tinder was on GitHub…. but I will check it out, thanks