[erlang-questions] Re: Will parameterized modules become an official part of Erlang?
Tuncer Ayaz
tuncer.ayaz@REDACTED
Sun Feb 21 02:38:46 CET 2010
On Sat, Feb 20, 2010 at 11:32 PM, Steve Davis
<steven.charles.davis@REDACTED> wrote:
> Hi Tuncer,
>
> Yep, I have read that paper. I think that was where I first learned
> how to use parameterized modules.
>
> I'm just saying that in practice, I am personally using them less and
> less.
I do think that experimental implies that a feature and its current
implementation are being tested and may be replaced or removed.
Parameterized modules, -extends and package support are IIRC all
experimental and it's good because it gives us a way to avoid
accidentally introducing features that look good on paper and not
being able to change/remove them later on.
So having a discussion about parameterized modules is a good thing.
If it wasn't for great features like bit syntax and bit string/list
comprehension I would be tempted to say "less syntax with more power
instead of more syntax with less power in each".
> On Feb 20, 9:14 am, Tuncer Ayaz <tuncer.a...@REDACTED> wrote:
>> On Sat, Feb 20, 2010 at 2:56 PM, Steve Davis
>>
>>
>>
>>
>>
>> <steven.charles.da...@REDACTED> wrote:
>> > Hi David,
>>
>> > Most of the parameterized modules I have written have evolved in my code to
>> > become un-parameterized modules; either by evolving into standard functional
>> > modules where the additional arguments are passed in, or gen_servers where
>> > the state is maintained in the process. In these cases, my experience of
>> > having parameterized modules in my code has convinced me to remove them as
>> > the application codebase matured.
>>
>> > The few remaining parameterized modules that I use also use the process
>> > dictionary in addition and so are side-effect monsters waiting to happen. I
>> > currently expect that these remaining parameterized modules will also
>> > disappear in due course into gen_server processes.
>>
>> > As a result of this experience, my opinion on parameterized modules is that
>> > currently that I really shouldn't use them and that, in the end, my code is
>> > probably better off without them.
>>
>> Richard's paperhttp://www.erlang.se/workshop/2003/paper/p29-carlsson.pdf
>> reveals the rationale behind param'ed modules.
>>
>> ________________________________________________________________
>> erlang-questions (at) erlang.org mailing list.
>> Seehttp://www.erlang.org/faq.html
>> To unsubscribe; mailto:erlang-questions-unsubscr...@REDACTED
>
> ________________________________________________________________
> erlang-questions (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:erlang-questions-unsubscribe@REDACTED
>
>
More information about the erlang-questions
mailing list