Elixir has _something_ similar: Behaviors - <a href="http:&#x2F;&#x2F;elixir-lang.org&#x2F;getting-started&#x2F;typespecs-and-behaviours.html" rel="nofollow">http:&#x2F;&#x2F;elixir-lang.org&#x2F;getting-started&#x2F;typespecs-and-behavio...</a><p>While this isn&#x27;t exactly what you like, I thought I&#x27;d throw it out there because I find it a fair substitute, especially when paired with Dialyzer - a static code analysis tool: <a href="http:&#x2F;&#x2F;erlang.org&#x2F;doc&#x2F;man&#x2F;dialyzer.html" rel="nofollow">http:&#x2F;&#x2F;erlang.org&#x2F;doc&#x2F;man&#x2F;dialyzer.html</a>