[erlang-questions] Proposal for not allowing tuple calls

Dmitry Belyaev <>
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. 
-- 
Best wishes,
Dmitry Belyaev

On 13 April 2015 4:08:38 PM AEST, "Björn Gustavsson" <> wrote:
>On Sat, Apr 11, 2015 at 5:22 PM, José Valim
><> wrote:
>[...]
>> Furthermore, erlang:apply/3 also allows tuple calls, not giving us
>any
>> alternative to disallow such behaviour, even if it explicitly.
>>
>> For those reasons, I would like to propose a new function and a
>compiler
>> 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
>
>-- 
>Björn Gustavsson, Erlang/OTP, Ericsson AB
>_______________________________________________
>erlang-questions mailing list
>
>http://erlang.org/mailman/listinfo/erlang-questions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150414/34d9b74d/attachment.html>


More information about the erlang-questions mailing list