It'd be nice if functions returned {:error, X}
and {:ok, Y}
. It results in more elegant client code that doesn't have to match against specific structures.
def(%Transmission.Response{id: id), do: ...
vs
def({:ok, %{id: id}}), do: ...
Same same with case
and with