Extending Functionality: an expedient and questionable approach

Chris Pressey chris_pressey@REDACTED
Thu Mar 13 23:08:34 CET 2003


Lennart Öhman wrote:

> 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...

This tweak *is* a powerful feature which trades off organizational
predictability for expressivity, and should be treated with respect.
I can totally understand it being frowned upon.

However...

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

...otherwise what happens?  I'm curious.

i.e. an hour ago, I would have believed you... but I've been
intentionally introducing errors into rectangle.erl and square.erl just
to see what happens...

And I'm suprised.  I really, really, REALLY thought that calling an
undefined function from square:undefined_function/2 (or something it
calls) would throw the runtime into an infinite loop (or worse).  But
so far, I have yet to crash the emulator in a bad way - I just get the
usual error reports (I can even catch them in the usual way - from the
shell or with -run on the commandline)

I just wish I understood why!

> /Lennart

-Chris

______________________________________________________________________ 
Post your free ad now! http://personals.yahoo.ca



More information about the erlang-questions mailing list