[erlang-questions] Re: Parameterized module idioms

Bob Ippolito bob@REDACTED
Sat Apr 17 18:36:00 CEST 2010


On Sat, Apr 17, 2010 at 3:57 AM, Hynek Vychodil <hynek@REDACTED> wrote:
>> For example, [unless you're doing some crazy rewriting tricks] it's
>> obvious which function this is calling:
>>
>>    some_module:echo(E, "hello")
>>
>> This isn't so obvious:
>>
>>    E:echo("hello")
>>
>> Here you have to trace back to the definition of E to find out what
>> module it refers to.
>
> I agree with you. It is issue especially in projects with lack of
> documentation as mochiweb for example. I thought parametrized modules
> is great idea until I met mochiweb.

To be fair there's edocs for all of the public functions and there's
really only one parameterized module you have to use
(mochiweb_request). It's really not that hard to figure it out, you
only look in one place for the docs. Yes, it should have some
expository documentation but that's not something I ever got around to
doing, and it's why I never did the other stuff like make a webpage
for it or release tarballs.

-bob


More information about the erlang-questions mailing list