I am aware of the absence of a “pep”-like(1) guide for Elixir, however working my way through the book “Functional Web Development with Elixir, OTP, and Phoenix” I see different function block definitions without obvious (to me) reasons.
For example, page 114 - chapter 5 - defines a GameSupervisor module that implements a few functions, two of which are sampled below;
def start_game(name), do: Supervisor.start_child(__MODULE__, [name]) def stop_game(name) do Supervisor.terminate_child(__MODULE__, pid_from_name(name)) end
Is this the author random picking do/end over do: or is there some, perhaps undocumented, rule of thumb?
Also, while questioning style guidance, is there any belief over function grouping, e.g. is it best practice to cluster private and normal functions that relate together (in a particular order?) or is there some other kind of sorting preference?
(1) Python Enhancement Proposal