3 ms·
> Separation of concerns is not a rule to be applied blindly A switch statement that only calls functions is almost like a state machine transition table (gran
by dqpb 4y ago
> Separation of concerns is not a rule to be applied blindly
A switch statement that only calls functions is almost like a state machine transition table (granted not a very good one).
Organizing conditional logic into a state machine is an excellent separation of concerns. The state machine becomes essentially an abstract model of your system that says what to do and when to do it, but not the low level details of how to do it.
The functions that define how to do it are the refinement of the model. You then have something thats directly mappable to TLA+, which you can use to model check your system.