[erlang-questions] Why we need a -module() attribute?

Richard A. O'Keefe <>
Thu Feb 25 23:15:27 CET 2016



On 25/02/16 10:29 pm, Vlad Dumitrescu wrote:
>
> If the compiler is supposed to read the archive, then you mean that 
> the source files should be packed in one?
"Should" is up to the programmer.  What I'm advocating is "could".

> I can see the use for beam files to be distributed this way, but I'm 
> not sure about sources - if they are supposed to get edited, then we 
> have to unpack them anyway;
Well, if it comes to that, there's no reason why the *editor* couldn't 
work out of
a zip file.  Try this: I get the Erlang/OTP sources, and I love that, 
and I *could*
edit them if I needed to.  Indeed, on very rare occasions I have. But 
most of
the time I *don't* edit them.  Or to put it another way, I have a 
project in another
language.  Out of nearly 1800 files, nearly 45 of them have been changed in
the last week.  That's one file out of 40.  Why should 39 files be
just so I can edit 1 out of 40?

Even now, if you want to edit a file, you have to unpack IT, not THEM.

Then too, there are lots of things one can do with source files besides 
compile
and edit them.
> if not, then beams are just as good.
I explicitly indicated that OASES files might point to things other than 
modules.
I believe it to already be the case that people are allowed to put other 
things
than modules in .ez files.




> Or am I missing something?
>
> best regards,
> Vlad
>



More information about the erlang-questions mailing list