[erlang-questions] Difference between gen_server and gen_fsm

Ulf Wiger ulf@REDACTED
Thu Oct 11 08:39:18 CEST 2007


I agree - gen_fsm can lead to cleaner code, and this might be
significant esp in state machines with many states.

BR,
Ulf W

2007/10/11, Jack Orenstein <jao@REDACTED>:
> I'm going through the OTP design principles book and think that I am
> missing the point of gen_fsm. The difference between gen_fsm and
> gen_server seems to be a small syntactic one. Instead of handle_call
> handling each kind of request, there is a function per FSM state. Not
> having used gen_fsm yet, it seems that gen_fsm would lead to cleaner
> code. But the two behaviors are so similar, I feel that I am either
> missing the point of gen_fsm, or completely missing some aspect of
> its behavior. Can someone please explain the distinction?
>
> Jack Orenstein
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
>



More information about the erlang-questions mailing list