Big state machines

Ulf Wiger <>
Sat Apr 23 13:45:48 CEST 2005


Den 2005-04-22 18:31:12 skrev Vance Shipley <>:

> %%            ___
> %%           (_y_)
> %%             |
> %%       +-----+------+-----+
> %%     __|_  __|_   __|_  __|_
> %%     >_a_| >_b_| /_c_/ /_d_/
> %%      _|_   _|_
> %%     (_x_) (_y_)
> %%
> y(SysData, StateData) ->
>     receive
>         ?SYSTEM(y, SysData, StateData);
>         ?EXIT(y, SysData, StateData);
>         a ->
>             x(SysData, StateData);
>         b ->
>             y(SysData, StateData);
>         Msg when Msg /= c, Msg /= d ->
>             y(SysData, StateData)
>     end.


<aside>
   Wow! I just learned, by accident that if you select
   a piece of text in an email and then hit "Reply",
   the Opera mail client will extract your selection
   and quote it.  Very nice. Messed up the indentation,
   though, but still... (:
</aside>

What I meant to say that this is a pretty nice way
of illustrating the claim that SDL and Erlang are
at roughly the same abstraction level.

/Uffe



More information about the erlang-questions mailing list