3 ms·
"From my perspective, this is the fundamental promise of async fn: easier, composable, explicit state machines." Honestly, working in embedded... I don't want
by cmrdporcupine 3y ago
"From my perspective, this is the fundamental promise of async fn: easier, composable, explicit state machines."
Honestly, working in embedded... I don't want my state machine hidden like this. I want it up front and explicit, documented, and observable. I want to be able to query components to find out what state they're in. I want to be able to keep metrics on their transitions. I want logging at the transition points. And I want the whole thing specified in code and comments, and I want to be able to see up front how it's using its resources and I want each component to describe its potential state movements. Even better if I can use declarative/formal analysis tools to check them, too (see e.g. stateright)
The risk with the async call-flow pattern is the creeping emergence of new undocumented state transitions, and potential new error states and edge conditions that come from them.