Extending Functionality: an expedient and questionable approach

Lennart Öhman lennart.ohman@REDACTED
Thu Mar 13 22:02:11 CET 2003


With the risk in just throwing my self into a thread I have not
followed closely...

We have been down this road before, 10 years ago. In an attempt to
introduce OO-mechanisms into Erlang. It did not turn out well...

Consider that all the code you execute after the flow of control
entered into the error_handler *must* be correct.

/Lennart

Chris Pressey wrote:
> OK, so I finally got up the courage to ignore the warning in the error_handler documentation, and
> hacked error_handler.erl to handle the first iteration of Vlad D.'s proposal - basically, that
> delegation/inheritance can be handled at the module level.
> 
> Partly this is because I agree that there ought to be something like this or I'll eventually end
> up creating too many processes with no good justification for their existence... and also because
> I couldn't figure out what the heck was going on in gen_server_2.  :)
> 
> What it does is this.  If you call an undefined function in any module, it looks to see if that
> module exports a function called undefined_function/2. If it does, it calls that instead with
> (Func, Args) as the arguments. If not, it crashes like usual.
> ...

-------------------------------------------------------------
Lennart Ohman                   phone   : +46-8-587 623 27
Sjoland & Thyselius Telecom AB  cellular: +46-70-552 6735
Sehlstedtsgatan 6               fax     : +46-8-667 8230
SE-115 28 STOCKHOLM, SWEDEN     email   : lennart.ohman@REDACTED




More information about the erlang-questions mailing list