[erlang-questions] newbie: why c.erl is special?
Anthony Kong
anthony.hw.kong@REDACTED
Wed Mar 5 11:11:09 CET 2008
Thanks, Richard,
Sorry again for the false alarm.
I think this "a.b.c.d" notation is a good idea. For once it allows us
to structure the source code tree better.
The catch are the erlc flag (which I just realised) and mandatory
explicit import of other top level modules such as io and lists.
Cheers, Anthony
On Wed, Mar 5, 2008 at 9:02 PM, Richard Carlsson <richardc@REDACTED> wrote:
> 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
>
>
>
--
/*--*/
Don't EVER make the mistake that you can design something better than
what you get from ruthless massively parallel trial-and-error with a
feedback cycle. That's giving your intelligence _much_ too much
credit.
- Linus Torvalds
More information about the erlang-questions
mailing list