[erlang-questions] newbie: why c.erl is special?
David Mercer
dmercer@REDACTED
Wed Mar 5 19:21:30 CET 2008
What am I missing from the description of Erlang packages that does not do
what everyone wants: namely, namespaces? I would think if I want to create
all my modules under my own "mercer" namespace, I'd just put them in a
directory called "mercer" and then name my modules "mercer.M" (where M is
the module name.
If this is what everyone seems to want, why hasn't the package notation
caught on?
Cheers,
David Mercer
-----Original Message-----
From: erlang-questions-bounces@REDACTED
[mailto:erlang-questions-bounces@REDACTED] On Behalf Of Richard Carlsson
Sent: Wednesday, March 05, 2008 04:02
To: Anthony Kong
Cc: erlang-questions
Subject: Re: [erlang-questions] newbie: why c.erl is special?
It was implemented a long time ago, but there was not a lot of
community enthusiasm for it, so it's not been made an official
part of the language yet. Still, it should work also in R12.
http://www.erlang.org/doc/man/packages.html
It was originally inspired by/ripped off from Java, but in
practice it's more similar to Lisp namespaces; see "The Complete
Idiot's Guide to Common Lisp Packages" for details:
http://www.flownet.com/ron/packages.pdf
/Richard
Anthony Kong wrote:
> Is it already implemented? Because I found this document:
>
> http://www.erlang.se/publications/packages.html
>
> Anyway, I was unable to get it to work according to this info.
>
> Cheers, Anthony
>
> On Sun, Mar 2, 2008 at 12:38 AM, Thomas Lindgren
> <thomasl_erlang@REDACTED> wrote:
>> --- shiwei xu <xushiweizh@REDACTED> wrote:
>>
>> > I think flat module namespaces is a defect of erlang
>> > design.
>>
>> Richard Carlsson proposed java-like packages some
>> years ago, and the code for them might still be
>> provided in OTP. (I thought they had some flaws, but
>> they might be what you want.)
>>
>> http://citeseer.ist.psu.edu/398052.html
>>
>> The usual approach to handling name clashes without
>> packages is to use your 'approach 2', prefixing the
>> modules with their owner application.
>>
>> Best,
>> Thomas
_______________________________________________
erlang-questions mailing list
erlang-questions@REDACTED
http://www.erlang.org/mailman/listinfo/erlang-questions
More information about the erlang-questions
mailing list