Behaviours, defoverridable and implementations

I think the main reason people are doing crazy macro things around behaviours is that there’s no good guide or example on how to do this.
So when people want to give an interface similar to GenServer with some additional callbacks, they define regular handle_call functions inside __using__ and make things overridable. This has a lot of issues, poor debugability being probably the biggest one.

I think education could go a really long way in here, so I’d like to propose attaching creating a “Write your own behaviour” guide to the proposal.

10 Likes