Subject: Re: [boost] Meta State Machine library review starts Monday
From: Christophe Henry (christophe.j.henry_at_[hidden])
Date: 2009-11-30 14:34:34
> Why the transition table uses non-type template parameter for actions
> and guards instead of using a agreed function name for handling events
> in states?
Thinking further about it, do you mean like Statechart's react function?
It'd be possible of course, I even imagined adding a SC-like frontend.
The problem is, when your fsm becomes bigger, you might find out that
following what your fsm is doing is harder because you have to look in
many different places in your code.
On the opposite, having more information in the transition table will
help you have a better view of the structure of your state machine
when it gets bigger.
The other drawback (in my opinion) of SC's react, is that it
automatically forces on you some forward state declaration as a state
will need to know all of its possible followers.
It also prevents reuse of states or composites in another fsm.
And finally, my biggest worry about such a react function is that it
becomes harder to build a GUI which can generate your code from a
diagram and next to impossible to parse back the code into a model, so
it 's not an ideal approach for Model-Driven development.
A transition table, on the other side, makes it pretty simple to build
a tool whose job is model <-> code development (both ways).