[erlang-questions] Proposal for not allowing tuple calls
Tue Apr 14 10:40:26 CEST 2015
Are there any plans to introduce a 'module' type in erlang? That would allow to get rid of that abomination called tuple calls and introduce a correct implementation of parameterized modules. Exactly the same way as lambdas capturing context values were introduced.
On 13 April 2015 4:08:38 PM AEST, "Björn Gustavsson" <bjorn@REDACTED> wrote:
>On Sat, Apr 11, 2015 at 5:22 PM, José Valim
>> Furthermore, erlang:apply/3 also allows tuple calls, not giving us
>> alternative to disallow such behaviour, even if it explicitly.
>> For those reasons, I would like to propose a new function and a
>> option that disables the tuple calls.
>> erlang:apply_no_tuple(Mod, Fun, Args).
>My personal opinion is that in some future release
>of OTP, the plain apply/3 should *not* allow tuple modules,
>and that there should be some other apply-like function
>to allow tuple modules (e.g. apply_tuple_module/3).
>Similarly, there should be a compiler option to allow
>calls such as Mod:f() to support tuple modules.
>That is, in that future release, those who want to use tuple
>modules will have to to opt in.
>Björn Gustavsson, Erlang/OTP, Ericsson AB
>erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions