-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We plan to provide better abstractions around GenServer and GenEvent in upcoming releases but we won't do so for GenFSM. There are other interesting approaches out there, like `plain_fsm`, which are easier to understand and use than OTP's FSM.
- Loading branch information
José Valim
committed
Mar 8, 2014
1 parent
a6f048b
commit 455eb4c
Showing
3 changed files
with
6 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
455eb4c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
455eb4c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will there be some other standard elixir FSM wrapper at some point in the future? I was just beginning to use GenFSM when I saw this; the project is not urgent by any means but I will need to do something with it at some point. Not sure if I should wait for another elixir solution like GenFSM or try to learn the stock erlang plain_fsm.
455eb4c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mus0u you can also use Erlang's :gen_fsm directly, which GenFSM is a simple wrapper for. I don't think we will get an FSM solution before 1.0.
455eb4c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, makes sense. Thank you!
455eb4c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello, is there are any new FSM solutions or maybe we should get back to this? :)
455eb4c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AndrewDryga the new kid in town is
gen_statem
, which was released in Erlang 19. There is no official plan of wrapping this in Elixir as it is straightforward to use the Erlang version directly; if you still want an Elixir way of interacting with it, there's https://github.com/antipax/gen_state_machine as well :)455eb4c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gen_statem
is currently experimental so we would require at least OTP-20 before thinking about. The behaviour has incompatible changes between OTP-19.0 and OTP-19.1.455eb4c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fishcakez that is a good thing to point out, yes.
455eb4c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any updates of gen_statem included in OTP 22.2 @whatyouhide
455eb4c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@edudemy no plans for now, I think the plan is to use gen_statem directly, which works very well anyways :)