[erlang-questions] newbie: why c.erl is special?
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
[mailto:erlang-questions-bounces@REDACTED] On Behalf Of Richard Carlsson
Sent: Wednesday, March 05, 2008 04:02
To: Anthony Kong
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.
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:
Anthony Kong wrote:
> Is it already implemented? Because I found this document:
> 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.)
>> The usual approach to handling name clashes without
>> packages is to use your 'approach 2', prefixing the
>> modules with their owner application.
erlang-questions mailing list
More information about the erlang-questions