lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


>   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).
>
> [...] 
>
>   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"?

I am all in favor of "Luarizing" APIs. (PiL has an example where first
it builds an API for opendir/readdir/closedir, then it repacks them in
a single iterator function to traverse directories.)

-- Roberto