lua-users home
lua-l archive

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


> Indeed; this is one of the several reasons I think
> it would be good for even the standard Lua libraries
> to be written using tolua (or a similar tool), and

The main reason why this is not possible is that the standard Lua libraries
create their own semantics and are not simply the export of an existing C
library. For instance, the iolib is definitely not stdio; the strlib is
similar to string.h but allows strings to be indexed from the end and also 
handles embedded zeros; the math lib uses degrees instead of radians.

tolua and SWIG are great for exporting existing C libraries, with their
exisiting semantics. Even so, the exported libraries may be improved by
adding a Lua interface to them. See for instance my gdm binding.
--lhf