[erlang-questions] Parameterized module initialization

José Valim <>
Tue Jun 26 21:34:33 CEST 2012


>
> I have no solution to offer, though.
>

A possible solution, which would also fit well with Richard's static
proposal, is something along the same lines as Python which requires you to
explicitly pass *self*:

    some_fun(A, B, self) -> ...
    some_static_fun(A, B) -> ...

Then the perceived arity is correct and you get static support for free. Of
course, we cannot use "self" as keyword as Python, but maybe ?SELF or
another special token will suit well.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20120626/f908d3b8/attachment.html>


More information about the erlang-questions mailing list