Your own behaviours

Ulf Wiger etxuwig@REDACTED
Tue Sep 4 16:09:10 CEST 2001


On Tue, 4 Sep 2001, Lennart Öhman wrote:

>Hi!
>
>Mandatory callback functions, among other things, are defined
>in the module otp_internal. This module is used when compiling
>modules having -behavior attribute.
>
>If you wish to extend your OTP with your own behaviors, otp_internal
>must (should) be changed.
>
>My suggestion is that the functions in the otp_internal are changed to
>look for the "answers" in the generic module corresponding
>to the behaviour at hand. In this way you do not need to change
>modules belonging to the original system. But instead only program
>a set of required functions in any new behaviour you invent.


I did this a while back when I modified the supervisor behaviour.

http://www.erlang.org/ml-archive/erlang-questions/200102/msg00071.html


Personally, I thought it was a formidable improvement, but my
excitement didn't seem to rub off on too many others... (:

I still think it's a good idea.

/Uffe
-- 
Ulf Wiger                                    tfn: +46  8 719 81 95
Senior System Architect                      mob: +46 70 519 81 95
Strategic Product & System Management    ATM Multiservice Networks
Data Backbone & Optical Services Division      Ericsson Telecom AB




More information about the erlang-questions mailing list