[erlang-questions] idea: service pack one

Yariv Sadan <>
Wed Nov 14 20:51:18 CET 2007


> 4) Simple code inheritance for the simple sake of easy reuse by
> importing functions from other modules (some of which might be
> "abstract" in the sense that they are useless other than to provide
> said shared common code to child modules).  No need to get into OO
> modeling crap here, this is just about typing less to get the same job
> done.  Sometimes the idea of abstracting things as generalized
> functions with function reference arguments and/or return values makes
> the most sense, but at other times, code inheritance really makes more
> sense.  I would recommend that we study other language's models here
> and do it right from the start, instead of trying to hackishly alter
> this as we go down the road.  The big decisions, and how I feel about
> them (feel free to disagree):
>

Until inheritence is implemented into the language, you can use
smerl:extend() to get the same result. (Smerl comes with ErlyWeb,
which uses smerl:extend() to enable "inheritence" from erlydb_base and
to enable the erlyweb_magic feature).

Yariv



More information about the erlang-questions mailing list