Re:State Machine in Real Life
by heavenlyblue on Saturday May 02, 2020 @07:00PM
(#23055562)
State machines don’t need to be runtime programs.
They can be expressed exactly using a static type system - that’s kind of exact the proposition of them.
The idris book opens with a section on dependently-typed state machines and it’s magnificent.
What book is this?
Type driven development with idris
They work well for protocols too!
Re:State Machine in Real Life
by heavenlyblue on Saturday May 02, 2020 @07:02PM
(#23055569)
A reasonably powerful subset of regex is a state machine.
I think when people call it "State Machines", it's for when they know the slightest breeze will trip it up. It's so seductive, because your initial use case gets resolved fairly quickly..
Ironically, the places they have worked wonders, is actually game engines from early 90's, where they have specific design, purposes, and limitations.