<div dir="ltr"><div><span id="bc_0_2b+seedNGaTD">My reply to the same question in a comment to my latest blog:<br></span><blockquote><span id="bc_0_2b+seedNGaTD">That was a long time ago but I
seem to remember that the "-module" came first. This was part of the
syntax and how you defined a module. The requirement that the module
name and the file name be the same came later and is actually part of
the libraries, both the compiler and the code server. The compiler saves
the BEAM code in a file with the same name as the module while the code
server assumes that the code in a BEAM is for a module with the same
name as the file. It would be easy for the compiler to save the BEAM in a
file with the same name as the module. This would need no change to the
code server. What you would need to do is take away the
warning/correction in emacs.</span><br><span id="bc_0_2b+seedNGaTD"></span></blockquote><span id="bc_0_2b+seedNGaTD"></span><blockquote><span id="bc_0_2b+seedNGaTD">Seeing I view them, the module
definition and the file name requirements, as being different types of
properties I don't think we should remove the module definition.
Changing the handling of the file names I would have nothing against. It
really doesn't worry me either way.<br></span></blockquote>That's my opinion anyway.<br><br></div>Robert<br><div><div><div><span id="bc_0_2b+seedNGaTD"></span></div></div></div></div><div class="gmail_extra"><br>
<br><div class="gmail_quote">On 23 January 2014 17:16, Tuncer Ayaz <span dir="ltr"><<a href="mailto:tuncer.ayaz@gmail.com" target="_blank">tuncer.ayaz@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Is there a technical reason why a module without a -module(name)<br>
definition should not be accepted by compile:file/2?<br>
<br>
As it stands, filename and module definition of a module have to<br>
match, so why not remove the module definition requirement?<br>
<br>
I'm only talking about user edited .erl files.<br>
</blockquote></div><br></div>