[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Automatic bind generator
- From: Hisham <h@...>
- Date: Fri, 15 Mar 2013 15:30:43 -0300
On 11 March 2013 03:09, William Ahern <firstname.lastname@example.org> wrote:
> I've taken to installing C bindings as module _foo.so. The Lua module,
> foo.lua, then implements iterator interfaces, I/O polling, etc.
> How do other people handle this? Just do it all using the Lua C API?
The approach of writing modules with low-level parts in C and
high-level parts (including end-user API) in Lua is quite typical,
often with modules named "foo" for the Lua part and "foo.core" for the
C part (e.g. LuaSocket with socket and socket.core, mime and
mime.core; LuaLanes with lanes and lanes.core; lua-term with term and
term.core; to name a few). In terms of naming, even many pure-Lua
modules use the foo vs. foo.core namespacing for organizing public API
and "private" submodules.