[erlang-questions] module reloading

Per Hedeland per@REDACTED
Wed Apr 18 13:35:50 CEST 2018


On 2018-04-18 13:19, Attila Rajmund Nohl wrote:
> 2018-04-18 8:28 GMT+02:00 Per Hedeland <per@REDACTED <mailto:per@REDACTED>>:
> [...]
> 
> 
>     OK, so I looked at the code, and the change (see below) is so trivial
>     that there is probably a good reason it doesn't already do that - I
>     don't know what that reason might be though...
> 
> 
> 
If someone accidentally mistypes a module name (to an other, existing module name), it might be unwise to load that different module
. Especially that the different module might have some code that
> executes at load time...

Well, yes, but there's lots of damage you can do by accidental
mistyping... And if you want to be able to get function-name completion
*at all* for a not-yet-loaded module, you will *have* to type its name,
hopefully correctly. See also the workaround for the lack of
auto-loading on completion-request that Fernando described earlier - I
suspect we're not alone in using it, and it's actually worse than
accidentally just loading the wrong module, since it also attempts to
call a function in the module...

--Per



More information about the erlang-questions mailing list