Wiger Ulf ulf.wiger@REDACTED
Mon Jul 28 22:48:08 CEST 2003

From: "Thomas Lindgren" <thomasl_erlang@REDACTED>

> If a module has several behaviours, which I *do* think
> should be possible, a linter should probably check
> that their required functions do not overlap. In that
> case, something is likely to be wrong.

This is the main reason why I'm against multiple behaviours.
The functions _are_ likely to overlap, or differ only in arity.
Consider for example init(), handle_call(), terminate(),
which can be found in gen_server, gen_fsm, gen_event.
The behaviour framework was obviously based on the
assumption one module <-> one behaviour, and, if anything,
_encourages_ cloning callback names from other behaviours.


More information about the erlang-questions mailing list