lua-users home
lua-l archive

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


The purpose of supporting modules that can only be imported by specific other modules is to allow subsystems to be built in a modular fashion while only exposing a subset of the interfaces to the rest of the world. In particular, when building subsystems out of a mixture of native code and Lua, it's very useful to only expose the Lua code while having the native code exposed just to the other pieces of the subsystem. For example, this allows one to handle all of the interface niceties and safety precautions in Lua and go with the simplest possible interface on the native code side.

Mark