<div dir="ltr">I have some feedback based on my experience in writing and teaching Erlang/Elixir.<div><br></div><div>1. I would always require the supervision strategy. When I am prototyping, it is usually hard for me to reason about the intensity and restarts, but I can always reason about the supervision strategy. All teaching materials I know of also discuss the supervision right away, so having it explicit shouldn't hurt those cases.</div>
<div><br></div><div>For such cases, maybe we should use the format of {{strategy(), map()}, [children()]} (which is similar to what we have today).</div><div><br></div><div>2. I also agree with Richard. Having a default of 0 restarts may cause confusion and forcing people to define them won't help when they still have no idea of what values they should use (because it is prototyping / early deploys). I usually fine tune those values based on the production system reports so having saner defaults, like Ulf's, may make more sense.</div>
<div><br></div><div>3. The child_spec defaults are great and similar to the ones we use in Elixir with the only difference being the shutdown value. We have a default of 5000, which is the one usually recommended, but we set it to "infinity" if the type is a "supervisor" (which is the OTP docs recommendation if I remember correctly).</div>
<div><br></div><div>Regarding 3., if the recommendation and the consensus in actual systems is to use brutal_kill for shutdown, I will gladly change Elixir to make it consistent with OTP defaults.</div><div><br></div><div>
Thanks for opening the changes for discussion!</div><div><div class="gmail_extra"><div><div><br></div><div><span style="font-size:13px"><div><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><b>José Valim</b></span></div>
<div><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><div><span style="font-family:verdana,sans-serif;font-size:x-small"><a href="http://www.plataformatec.com.br/" style="color:rgb(42,93,176)" target="_blank">www.plataformatec.com.br</a></span></div>
<div><span style="font-family:verdana,sans-serif;font-size:x-small">Skype: jv.ptec</span></div><div><span style="font-family:verdana,sans-serif;font-size:x-small">Founder and Lead Developer</span></div></span></div></span></div>
</div>
<br><br></div></div></div>