is easy. Other functions using %Response{} will still work. defmodule MyModule do def handle_response(a, b), do: :ok end defmodule MyModule do def handle_response(%Response{a: a, b: b}), do: :ok end
dialyzer and dialyxir library - Design by Contract in Elixir “Let it crash” meets “It shouldn’t crash” https://www.youtube.com/watch?v=OcbE6nL1QEk - Chris Keathley - Well Typed Elixir https://www.youtube.com/watch? v=Jxfodke3oX8