State Machine in Real Life
solipsys.co.uk
solipsys.co.uk
state = match (state, event) {
(State1, Event1) => {
State2
}
(State1, Event2) => {
...
}
...
};How are you expecting that inserting or adding statements would change behavior?
It sure sounded this way (trying to scare) to me but if I am wrong please accept my apology. Besides I did say "sounds like" ;)
That you know of.
Stack and heap corruption have this nasty habit of surviving for weeks/months/years until the layout of something completely different changes and the whole thing comes crumbling down.
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.
They can be expressed exactly using a static type system - that’s kind of exact the proposition of them.