lua-users home
lua-l archive

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


On 11 March 2013 03:09, William Ahern <william@25thandclement.com> 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.

-- Hisham
http://hisham.hm/