[erlang-questions] Proposal for not allowing tuple calls

Björn Gustavsson bjorn@REDACTED
Mon Apr 13 08:08:38 CEST 2015

On Sat, Apr 11, 2015 at 5:22 PM, José Valim
<jose.valim@REDACTED> 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 Gustavsson, Erlang/OTP, Ericsson AB

More information about the erlang-questions mailing list