Show HN: Finite State Machine for Go
github.com
Show HN: Finite State Machine for Go
1–5 of 5 posts
Re: Show HN: Finite State Machine for Go
#2Re: Show HN: Finite State Machine for Go
#3I mostly like this. The only gripe I have with it is the stringly-typed way of triggering events. It seems like you might be able to better leverage the type system to ensure that spelling mistakes or fat-fingerings don't cause a runtime error sometime in the future. If the .Event() method took an object that satisfied the "Trigger" (or something) interface, instead of just a string, you might be able to catch those…
Re: Show HN: Finite State Machine for Go
#4Zed Shaw wrote a great essay about state charts in Ragel:
http://www.zedshaw.com/essays/ragel_state_charts.html
The official docs:
Re: Show HN: Finite State Machine for Go
#5I prefer to use Ragel as a DSL for FSMs, it'll generate Go code along with other languages. Adrian Thurston has done a fantastic job with Ragel. Zed Shaw wrote a great essay about state charts in Ragel: http://www.zedshaw.com/essays/ragel_state_charts.html The official docs: http://www.complang.org/ragel/ragel-guide-6.8.pdf