On 7/28/12 10:13 AM, Philippe Sigaud wrote:
"bearophile" <bearophileh...@lycos.com <mailto:bearophileh...@lycos.com>>
> Gotos are not so evil. Just use them when they are useful and they
can't be replaced by structured programming. In D I create finite state
machines at compile-time that use gotos, they are quick.
Do you happen to still have the code, by any chance? I think Phobos
could use a std.fsm, to automatically generate FSM at compile-time
(using lots of gotos :) ).
I've always found it difficult to generate FSMs from textual specs (as
opposed to regexen or pretty images). Problem is you need to name your
states, and in many FSMs intermediate states are not meaningful.
Andrei