Why is GenFsm Deprecated?

Why is GenFsm Elixir's behavior out of date?

I would like to implement a state machine with GenFsm behavior. I think that Agent not enough to describe the final state machine. Because Agent not suitable for describing the returning different values ​​of each state from the same input.

+7
elixir otp
source share
3 answers

See the corresponding commit: https://github.com/elixir-lang/elixir/commit/455eb4c4ace81ce60b347558f9419fe3c33d8bf7

Basically, now you can simply use :gen_fsm directly from OTP without the Elixir shell.

+11
source share

The core Elixir team decided it was too confusing and suggested the developers look for other solutions.

I wrote an Elixir cover about 3 days ago and clicked it on hex.pm with the name gen_fsm. Here's the github page: https://github.com/pavlos/gen_fsm if you want to check it out.

+2
source share

:gen_fsm also deprecated and replaced in Erlang / OTP 20.0 with :gen_statem , so use the Generic state machine. Check out this link about Genstatem for more information .

This is new behavior in Erlang / OTP 19.0. It was completely revised, stable enough to be used by at least two heavy OTP applications, and it should stay. Depending on user reviews, we do not expect, but may find it necessary to make a minor lag compatible changes in Erlang / OTP 20.0

+1
source share

All Articles