Boost logo

Boost :

From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2008-08-18 12:47:53

David Abrahams wrote:
> on Sun Aug 17 2008, Andrey Semashev <> wrote:
>> David Abrahams wrote:
>>> on Sun Aug 17 2008, Andrey Semashev <> wrote:
>>>> State machines, as I see it, are meant to define an object behavior,
>>>> IOW reduce the amount of undefined behavior. It is pointless to use
>>>> them to implement undefined behavior.
>>> So std::vector is pointless because it exhibits undefined behavior when
>>> misused?
>> No, vector is not pointless, because its purpose is to store elements,
>> not to define behavior.
> Sorry, but you're making no sense to me. The defined behaviors of
> vector are just as important as the defined behaviors of your FSM
> library.

I believe, Darryl Green has already cleared this point (thanks, Darryl).

>> I will need vector to store elements even with undefined behavior on
>> invalid pointers as its input. But why would I need FSM if it doesn't
>> define my object's behavior?
> Well, it would define useful behaviors for valid inputs.

That's right, I didn't think about it.

>>>> Please, have a look at my reply to Phil. I've attached a code snippet
>>>> with a transition map. Does that look more declarative?
>>> Not really, to me. It's very difficult for me to see the transitions in
>>> that code. Compare that with either of my player examples.
>> Hmm... I don't see much difference, except for comments markup. Both
>> code samples use transition maps, both use vectors... Is it because the
>> transition map in your code is a member of the complete FSM?
> Sorry, I don't know what a "transition map" is. In fact, when I google
> ``fsm "transition map"'' all the top hits come from your library, which
> tells me it's almost certainly not a known term in the FSM domain. I'm
> talking about a State Transition Table (STT)
> (

transition map == STT. I didn't know the term is that strictly defined.

Boost list run by bdawes at, gregod at, cpdaniel at, john at