lunatik
lunatik copied to clipboard
set `nop` as default in `device.new()`
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.
Perhaps the best approach is to have a higher-level API in Lua to avoid doing much in C; similarly to socket.inet