the OO metaphor
Torbjorn Tornkvist
tobbe@REDACTED
Wed Nov 29 12:56:02 CET 2000
Just for the record. Someone once implemented
inheritance in Erlang by writing his own error_handler.
So assume you want inherit from another module x.erl
the add a function base/0 in your y.erl module.
Then, let's say x:foo/0 exists but not y:foo/0.
When calling y:foo/0 the (tailor-made) error_handler
will be invoked. The error_handler extracts the
'base-class' by calling X=y:base/0 and then calls
X:foo/0, etc...
Cheers /Tobbe
More information about the erlang-questions
mailing list