[erlang-questions] Dynamic code loading and hotswap behaviour

Robert Virding robert.virding@REDACTED
Thu Nov 18 01:36:09 CET 2010


----- "Alessandro Sivieri" <alessandro.sivieri@REDACTED> wrote:

> 2010/11/16 Rapsey <rapsey@REDACTED>
> 
> > It reloads anyway and the mechanisms apply.
> >
> >
> And is there a motivation for this? I mean, it seems that reloading
> the same
> module more times can be seen as an error from a developer point of
> view, if
> this happens there is something wrong in my code, but anyway the
> runtime
> should understand that nothing has changed...

Well, the trivial answer is that it is doing exactly what you have told it to do. You told it to load a binary module, it loaded a binary module. How should the run-time be able to understand that "nothing" has happened?

Given the semantics of code loading then loading the module and not reloading the module because it happens to be the same are very different operations and I would definitely not want the system to try and be smart in the background. It also a very useful way of killing processes when developing.

Robert


More information about the erlang-questions mailing list