lua-users home
lua-l archive

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


On Fri, Jan 3, 2014 at 8:00 AM, Dirk Laurie <dirk.laurie@gmail.com> wrote:
2014/1/3 Sir Pogsalot <sir.pogsalot@gmail.com>:

> I add to the string and table libraries all the time -- if I plan to create
> a library, though, I don't mess with globals.  Lua, like C, encourages me to
> shoot myself (if convenient) and accept responsibility for it.   :-)

So do I … except that I call the modified versions xtable and xstring.


Seems like something I would do in C++ (inherit from, as partial class declaration is not possible) -- or if I were writing a library where it presumptuous to anything beyond the local scope of your module.  That may be appropriate and perhaps you yourself prefer that approach 100% of the time, but calling it 'xstring' might lead me to believe functions in that table operate on a separate string type entirely.  I would have to do more digging to kill my doubts -- I find adding to 'string' to be clearer (if I can).