The major benefit is compile-time checking:
- if
CustomerAsays@behaviour Handlerbut doesn’t supply callbacks with the correct arities, the compiler will complain - (sometimes) Dialyzer will be able to prove that a function’s implementation fails to match the behaviour’s spec
As a side bonus, libraries like mox can use that same behaviour for their definitions.






















