[erlang-questions] Why we need a -module() attribute?
zxq9
zxq9@REDACTED
Fri Feb 19 13:54:39 CET 2016
On 2016年2月19日 金曜日 13:39:44 Benoit Chesneau wrote:
>
> > On 19 Feb 2016, at 12:32, Loïc Hoguin <essen@REDACTED> wrote:
> >
> > I've mentioned that at the beginning of the thread. We're going circles now. :-)
> >
> > I really don't think getting rid of the mandatory -module attribute is such a hard problem to solve...
>
>
> for myself I am now wondering why we dont have a `-module` block and then ignoring the filename completely.
>
> -module(some).
> -endmodule.
>
> - benoit
This is a much more interesting idea, imo.
The reason I had referred to the filename == modname thing as a bandaid
is because it appears to be the way the code loader was kludged into finding
code -- because that's a workable and expedient solution, and writing an
actual resource resolver is a lot heavier (but more correct) solution.
-Craig
More information about the erlang-questions
mailing list