I find it quite readable especially with nested logic. Here is an example:
https://github.com/elixir-ecto/ecto/blob/master/lib/ecto/que...
Edit: Just remembered another use case where function overload is used to override default implementation
defmodule Downloader do
use GenServer
def handle_cast(:start, state) do
...
end
def handle_cast(:stop, state) do
...
end
end
Here, "use GenServer" imports default implementation of various handlers which can be overridden.https://github.com/elixir-lang/elixir/blob/main/lib/elixir/l...