[erlang-questions] OOP in Erlang
Fred Hebert
mononcqc@REDACTED
Wed Aug 11 14:25:21 CEST 2010
On Wed, Aug 11, 2010 at 6:24 AM, Ulf Wiger
<ulf.wiger@REDACTED>wrote:
>
> In short, I have not missed OO when using Erlang in its original
> domain. I have, on occasion, missed being able to conveniently
> extend modules and override individual functions when working
> on other things (e.g. like extending mnesia).
>
> BR,
> Ulf W
>
I believe you use mnesia:activity/4 to do this (change the callback module),
but wouldn't the -extend(Mod) module attribute solve your problem (even in
the case of mnesia?). As far as I know, it does exactly that: override
functions and leave the others to be called from 'Mod' when they are
undefined. Any reason why this wouldn't do or why you [maybe] dislike the
feature?
More information about the erlang-questions
mailing list