[erlang-questions] Proposal to remove tuple dispatches from Erlang
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
> >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
> > 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
> > [...]
> > * 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
> erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions