-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
- In retrospect, designs like
Fsm,State, andFsmStateseem unnecessary. We only needState, and by convention,Statemust always haveinfo, containing information such as thestate machine name. - We still seem to need a similar
Datatype.
pub const FindWord = union(enum) {
to_check_word: Data(.next, CheckWord),
exit: Dtat(.current, ps.Exit),
no_transition: Data(.current, FindWord),
...
};- Re-examine the names of states. For example, if there is a state
S(A, B), then its name should beS.This will greatly reduce the length of the name. - Is it allowed for messages to carry data? Before designing the
troupe, I didn't understand how to handle messages carrying data. Now I do understand; it requires both ahandlerand aprehandlerfunction to exist. Is this design worthwhile? I tend to think it is.
Although many of the ideas here come from troupe, troupe cannot replace polystate.
@milogreg I'd like to hear your opinion.
Metadata
Metadata
Assignees
Labels
No labels