You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Maybe it could break somehow concept of State Machine, but the idea is the following.
Sometimes there is need to define repeating transitions from one state to another. For example, there is state "Log message", and it should be executed after some selected 10 states. So now it is needed to implement this transition in each of those states.
But, what if there would be possible to define somehow callback for the states (maybe "callback" is not exactly proper term)? Something like: State A -> Log message State B -> Log message,
etc. - so then there will be no need to add "Add State(s) to Queue" function to each of the states, and string constant with the state.
This could be part of "Parse State Queue" function (additional input), because it controls states transitions and thus there could be done some kind of hook for those "callbacks". But on the other hand that could influence on performance of the function (if it will need to parse strings all the time...
The text was updated successfully, but these errors were encountered:
I like this idea, but the implementation would need to be a separate function to Parse State Queue (to prevent bloat).
A wrapper to Parse State Queue would do, or another function that appends an additional state next to PSQ.
The "Inbuilt way" would be to use Macros.
I will leave this issue open for now to see if this comment creates any traction in the idea. If not, I will close this issue in the upcoming weeks.
Maybe it could break somehow concept of State Machine, but the idea is the following.
Sometimes there is need to define repeating transitions from one state to another. For example, there is state "Log message", and it should be executed after some selected 10 states. So now it is needed to implement this transition in each of those states.
But, what if there would be possible to define somehow callback for the states (maybe "callback" is not exactly proper term)? Something like:
State A -> Log message
State B -> Log message
,etc. - so then there will be no need to add "Add State(s) to Queue" function to each of the states, and string constant with the state.
This could be part of "Parse State Queue" function (additional input), because it controls states transitions and thus there could be done some kind of hook for those "callbacks". But on the other hand that could influence on performance of the function (if it will need to parse strings all the time...
The text was updated successfully, but these errors were encountered: