lua-users home
lua-l archive

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


| > I suggest a more flexible scheme: in stdlua.lua (or whatever the
| > name is), test whether a table called "stdlua" exists. If it does,
| > then stdlua.lua should define only those functions whose name
| > appear in the table. In this way, users can choose the functions
| > they need.
|
| I'm not sure how useful this will be in practice.  Is the point to shave
| bytecodes?  Maybe it's not an issue for the intended audience.  Furthermore
| in utility libraries I've written, functions often have interdependencies.
| Allowing the user such control may break things depending on the
| implementation.

What about a library database type thing from which you import the code and then
execute it. eg. a library file could be formatted into sections (perhaps with
dependencies) and then sections read out of it, and executed. This would also
allow you to export just the bits you want for your particular project. There
would be a small overhead for parsing the "library database". The tool that
parses it might also strip out and create the docs and run a test suite? Just an
idea.