Nearly always, when starting a GenServer (or Agent or ...) from a process 
(so not inside a supervision tree), 
the process doing the starting does not have a reasonable behaviour to 
continue in the case that the starting fails
(other than to itself crash).

GenServer.start and GenServer.start_link (and Agent.start, 
Agent.start_link, etc.) return an `{:ok, pid}` tuple. (or `{:error, info}`)

I am wondering if it would be possible to introduce GenServer.start! and 
GenServer.start_link! (and item for Agent, ...)
that return just the `pid` (and crash on failure).
The main advantage of this is that start and start_link cannot be 
incorporated into pipelines, as they return a tuple, whereas
the bang-versions would.

Would this be a good idea, or has a conscious choice been made to *not* 
include bang-versions of GenServer.start and GenServer.start_link (and 
variants)?

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/440b9098-0adf-458e-8f5e-366dcbe9e6c4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to