lunatik icon indicating copy to clipboard operation
lunatik copied to clipboard

set `nop` as default in `device.new()`

Open sav opened this issue 1 year ago • 1 comments

currently, it's a common practice to initialize the device as: device.new(name="foo", open=nop, release=nop), where nop=function () end. we could assume it as the default, when no argument is provided.

sav avatar Sep 03 '24 11:09 sav

Perhaps the best approach is to have a higher-level API in Lua to avoid doing much in C; similarly to socket.inet

lneto avatar Sep 04 '24 15:09 lneto