<html><head></head><body>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. <br>
-- <br>
Best wishes,<br>
Dmitry Belyaev<br><br><div class="gmail_quote">On 13 April 2015 4:08:38 PM AEST, "Björn Gustavsson" <bjorn@erlang.org> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">On Sat, Apr 11, 2015 at 5:22 PM, José Valim<br /><jose.valim@plataformatec.com.br> wrote:<br />[...]<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;"> Furthermore, erlang:apply/3 also allows tuple calls, not giving us any<br /> alternative to disallow such behaviour, even if it explicitly.<br /><br /> For those reasons, I would like to propose a new function and a compiler<br /> option that disables the tuple calls.<br /><br /> erlang:apply_no_tuple(Mod, Fun, Args).</blockquote><br /><br />My personal opinion is that in some future release<br />of OTP, the plain apply/3 should *not* allow tuple modules,<br />and that there should be some other apply-like function<br />to allow tuple modules (e.g. apply_tuple_module/3).<br />Similarly, there should be a compiler option to allow<br />calls such as Mod:f() to support tuple modules.<br /><br />That is, in that future release, those who
want to use tuple<br />modules will have to to opt in.<br /><br />/Björn<br /></pre></blockquote></div></body></html>