[erlang-questions] Drive by mention of new features without explaination

Robert Virding <>
Mon Dec 7 23:08:56 CET 2009

2009/12/7 Zoltan Lajos Kis <>

> I'd give a +1 on changing the on_load handler to expect 'ok' instead of
> 'true'. The documentation states that "there may be backward-incompatible
> changes in the feature in future releases.", so that should not be a
> problem. But there might be plans unknown to us with on_load that makes
> 'true' the preferable choice. Who knows...
> btw, we could use this for now:
> run_me() ->
>    ok == erlang:load_nif("./niftest", 0).

If the on_load handler were to return 'ok' when it is successful then what
should it return on failure, 'error'? It still can't return what
erlang:load_nif does as its error returns are quite specific. And there
might actually be people who use the on_load handler for other things than
calling load_nif.


More information about the erlang-questions mailing list