[erlang-questions] Drive by mention of new features without explaination
Zoltan Lajos Kis
Mon Dec 7 21:55:00 CET 2009
Ulf Wiger wrote:
> Zoltan Lajos Kis wrote:
>> The on_load function expects 'true' to be returned, whereas
>> erlang:load_nif returns with 'ok' (which is definitely not 'true').
>> This will result in your module being unloaded.
>> run_me() ->
>> erlang:load_nif("./niftest", 0),
> Given that the NIF support is flagged as experimental,
> could this perhaps be fixed?
> Ulf W
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:
ok == erlang:load_nif("./niftest", 0).
More information about the erlang-questions