[erlang-questions] Misultin EOL
Joe Armstrong
erlang@REDACTED
Sat Feb 18 17:58:17 CET 2012
On Sat, Feb 18, 2012 at 5:16 PM, Jesse Gumm <gumm@REDACTED> wrote:
> Well that is good news to hear that param modules are here to say.
Well actually it's the abuse of PMs that will stay.
That {Mod,a,b,c}:foo(x,y) means foo(x,y,{Mod,a,b,c})
is an accidental side effect of the way parameterised modules
were implemented.
The "official way of creating a PM" is with Mod:new(...)
and NOT PM = {Mod,a,b,c}. Somebody (I don't know who)
discovered how to build a PM *without* calling Mod:new.
I discovered this when reading the misultin code since this
has never been documented. I fell mentally off my chair - I had no
idea this was possible. I think (I speculate here) that
misultin got the idea from mochiweb, but how mochiweb got the idea I know not.
It's actually a very nice mechanism - the MFA and fun alternatives are
a few characters more and less pretty
so it will stay.
/Joe
>
> --
> Jesse Gumm
> Owner, Sigma Star Systems
> 414.940.4866
> www.sigma-star.com
> @jessegumm
>
> On Feb 18, 2012 5:14 AM, "Joe Armstrong" <erlang@REDACTED> wrote:
>>
>> On Sat, Feb 18, 2012 at 12:05 PM, José Valim <jose.valim@REDACTED> wrote:
>> >> I'd be keen on simple bridge if the Erlang guys would just come out and
>> >> say if they support parameterized modules or not. If they don't, just
>> >> get
>> >> rid of it. What's the point of having something in a language if it's
>> >> not
>> >> going to be supported (but that's a different topic)?
>> >>
>> >>
>> >> I agree that if something is added as an experimental feature, it
>> >> should
>> >> either be graduated or removed as soon as possible, not stay
>> >> experimental
>> >> indefinitely.
>> >
>> >
>> > I don't use parameterized modules at all but it would be a pity to see {
>> > module, args }:function() go.
>>
>> It will stay - and be documented to make it official
>>
>> /Joe
>>
>>
>> >
>> > _______________________________________________
>> > erlang-questions mailing list
>> > erlang-questions@REDACTED
>> > http://erlang.org/mailman/listinfo/erlang-questions
>> >
More information about the erlang-questions
mailing list