[erlang-questions] Why we need a -module() attribute?
Fri Feb 19 15:03:17 CET 2016
> for myself I am now wondering why we dont have a `-module` block and then ignoring the filename completely.
This sounds nice. I think the first thing I’d do is start putting my application and top-level supervisor code in the same file (they’re generally small enough to both fit on one screen together). The second thing would be to wish that I could declare the same module in multiple files and have the compiler combine them for me:
-export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]).
handle_cast(poke, State) ->
After that, I’d start wondering about monkey-patching, so there’s that to watch out for.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 801 bytes
Desc: Message signed with OpenPGP using GPGMail
More information about the erlang-questions