|
Boost : |
Subject: Re: [boost] [msm] eUML guard/action location
From: Thomas Klimpel (Thomas.Klimpel_at_[hidden])
Date: 2009-12-08 16:20:46
+1
(sorry for top posting...)
________________________________________
From: boost-bounces_at_[hidden] [boost-bounces_at_[hidden]] On Behalf Of Michael Caisse [boost_at_[hidden]]
Sent: Tuesday, December 08, 2009 5:40 PM
To: boost_at_[hidden]
Subject: Re: [boost] [msm] eUML guard/action location
Stewart, Robert wrote:
> With whitespace, I agree that there's little difference between the two.
>
> Here's another suggestion, though it breaks from the logical UML ordering Michael posted previously:
>
> DestState() = CurrentState() + cool_event()[guard()]/(action())
>
> This is in keeping with Spirit's syntax in that the guard/action expression is positioned like a semantic action. It also reads better in C++ because we think in terms of evaluating the RHS and assigning the result to the LHS, and the RHS results in the state on the LHS in the above syntax.
>
>
Rob -
I actually like this quite a bit.
1. it keeps the event/guard/action with the source state
2. the '=' read funny to me in the other. Here it actually
reads "properly". RHS is evaluated and becomes LHS.
Nice suggestion.
michael
-- ---------------------------------- Michael Caisse Object Modeling Designs www.objectmodelingdesigns.com _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk