So to be clear, it is not particularly idiomatic to mix required and optional parameters as the example you gave has. Sometimes you get an optional parameter at the beginning IE
def some_message(process_name \\ __MODULE__, arg) do
GenServer.call(process_name, arg)
end
but the vast majority of the time it’s a best practice to leave defaults as the last argument(s). However as you observed the compiler is happy to handle any case.