[erlang-questions] Why we need a -module() attribute?
Steve Davis
steven.charles.davis@REDACTED
Fri Feb 26 01:52:31 CET 2016
BTW has anyone considered that this “issue” if “solved” would be the same solution that would solve the irksome pains caused by relative file & URI paths too? I suspect that a true solution would resolve all of that and be a major contribution to computer science… I’m listening :)
> On Feb 25, 2016, at 6:38 PM, Steve Davis <steven.charles.davis@REDACTED> wrote:
>
> It works. It’s worked for years. Works is good.
>
> Being lazy is good as a developer if the end is to produce clearer functions. It is not to avoid a second or two of typing at a keyboard — for sure you should always be writing code for the *maintainer* not for yourself (though you may indeed be that actor too).
>
> Erlang has so little “boilerplate” that this discussion seems entirely pointless (IMHO).
>
> If you wish to organize your source for convenience consider an Emakefile with a couple of lines like
>
> %
> {"src/*", [{i, "include"}, {outdir, "ebin"}, debug_info, strict_record_tests]}.
> {"src/*/*", [{i, "include"}, {outdir, "ebin"}, debug_info, strict_record_tests]}.
> {"src/*/*/*", [{i, "include"}, {outdir, "ebin"}, debug_info, strict_record_tests]}.
>
> Yes, still the modules need to have unique names but surely duplicated module names will always lead to confused code eventually.
>
> My 2c
>
> /s
More information about the erlang-questions
mailing list