3 ms·
Here's the funny thing: they are absolutely everywhere! It's just that the vast majority of them are implicit. What I mean by this is you can describe virtuall
by davidkpiano 6y ago
Here's the funny thing: they are absolutely everywhere! It's just that the vast majority of them are implicit.
What I mean by this is you can describe virtually every piece of "logic" in an app as a state machine - there are "behaviors" (finite states) that might change (transitions) due to something that happens (events).
The problem is that there are many ways developers wire those up, where the finite states, transitions, and events are there, but it's difficult to enumerate them clearly.
So why doesn't everyone use explicit state machines? Simply because languages make it easier to write implicit state machines (e.g., async/await), and it's the path of least resistance to getting code to "just work". Unfortunately, most developers care about the frictionless path rather than the most robust path, especially in this startup-driven world.