[erlang-questions] Proposal to remove tuple dispatches from Erlang

Richard Carlsson carlsson.richard@REDACTED
Thu Feb 14 11:59:42 CET 2019

For existing beam code that relies on tuple calls (parameterized modules),
there is now an upgrade path that allows you to bring the old code up on
OTP 21 before you recompile with the +tuple_calls compiler option (which
does not exist in OTP 20 and earlier):

For current users of OTP 21, this changes nothing (i.e., there is no tuple
dispatch) unless you explicitly pass the new '+ztma true' flag.
(The flag will not be available in OTP 22, so this is just for the


Den fre 14 apr. 2017 kl 15:00 skrev Fred Hebert <mononcqc@REDACTED>:

> On 04/14, José Valim wrote:
> >This behaviour is considered by most in the community to be undesired
> >and confusing, as it obfuscates the meaning of the code and adds
> >indirection.
> >
> >Please let me know if there are other options available,
> >
> >I will be glad to send patches and implement the required parse-transforms
> >if this is accepted by the OTP team.
> >
> One thing to consider is that this code is a remnant of parametrized
> modules, which have been removed back in 2012. See
> https://web-beta.archive.org/web/20121019180935/http://www.erlang.org/news/35
> > To allow for source code compatibility, the board decides to only
> > remove the syntactic support for parameterized modules. This means:
> >
> > * Apply with tuple modules will be retained, supported and properly
> documented.
> >
> > [...]
> >
> > * The parser will accept the syntax for implementation of
> >   parameterized modules [...]
> >
> > * A parse_transform handling source code implementing a parameterized
> >   module will be published in the public domain, free to use and
> >   include in any package needing it. It will however not be part of OTP.
> >   As it uses supported and documented functionality, it will however
> >   be expected to work for forthcoming releases as well, or at least
> >   to be possible to adopt to forthcoming releases.
> This is to say the OTP team made a commitment to supporting tuple calls
> as a way to remove parametrized modules and keep the code working.
> Removing tuple calls must at the very least ensure a seamless transition
> to keep working with the parametrized module parse transforms, and
> moreover have the guarantee that it will "be expected to work for
> forthcoming releases" because it "uses supported and documented
> functionality".
> Regards,
> Fred.
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20190214/078af5ee/attachment.htm>

More information about the erlang-questions mailing list