|
This isn't about luaposix per se, but this is prompting this observation
about Lua wrappers for C APIs: they tend to mimic it quite literally (to the
point where I think I've said this before: if I wanted to code in C, I know
where to find it).
When I look over existing Lua modules like luasocket, luaposix, various
other syslog implementations, I tend to see an almost slavish approach to
mimicking the C API as closely as possible, instead of, for lack of a better
term, Luaizing the API.
The thing is---am I alone in doing this? Do I have a different way of
handling C APIs in Lua? Is it more a matter of "following the C API as
directly as possible because of existing documentation"? Or of "this is
easier to do to get this out the door"? Or even "I didn't even think of
doing that"?
-spc (I'm really puzzled over this, as the modules I wrote tend to work
radically different from modules (that cover the same C API) that
others have written ... )