Sun Jul 27 22:03:09 CEST 2003
"Per Bergqvist", <per@REDACTED>, wrote:
> some questions regarding behaviours
> 1) a few modules requests multiple behaviours.
> what is the purpose of this ?
You can, for example, combine gen_server and gen_event,
or gen_server and supervisor in one module, but this tricks
the linter, confuses the reader, and is in general a bad idea IMO.
> 2) in megaco and mnesia user defined behaviours are requested
> but the target modules does not define the behaviour_info.
> why ?
Back in the old days, you could not define your own behaviour
without hacking some OTP code. I vaguely recall mnesia providing
a "quasi behaviour", which wasn't really a known behaviour, but
well could have been.
My guess is that the behaviour_info/1 function has not been added
yet, since the option to do so is a fairly recent addition.
More information about the erlang-questions