While Elixir doesn't make use gen_statem itself, I believe its utility 
makes it worthwhile supporting first-class in Elixir.

First-class support specifically entails:

   - A GenStatem module in Elixir's standard library
   - Comprehensive documentation
   - Inclusion in the default Logger.Translator

In brief, gen_statem's utilities have proven particularly useful for client 
libraries:

   - Managing cyclomatic complexity with state transitions
   - Postponing events until the necessary state's situated to process them
   - Comprehensive and easy to use timeouts
   - Ensuring systems operate in a predictable manner

A few prominent libraries using gen_statem today include:

   - elixir-ls
   - finch (req by extension)
   - xandra
   - nostrum
   - postgrex (Phoenix by extension)
   - livebook

I believe inclusion in Elixir's standard library would:

   - Improve visibility and accessibility, thereby encouraging usage
   - Prove a potentially pivotal asset to those wanting to author Elixir 
   libraries
   - Overall contribute to ecosystem growth and language adoption
   - Remove existing pitfalls with gen_statem not logging crashes properly

I don't believe any of the above merits unto themselves justify including 
gen_statem in Elixir. However I think it differentiates itself in a few key 
ways that move the needle:

   - It and gen_fsm before it are a key part of OTP's model of fault 
   tolerance
   - Its merits and performance overhead are well understood
   - It is reasonable in scope to include in the language itself

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elixir-lang-core+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/bd2452f3-9b3b-4e59-b35e-2b26dd7803f0n%40googlegroups.com.

Reply via email to