lua-users home
lua-l archive

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


2011/10/11 Patrick Rapin <toupie300@gmail.com>:

> On my opinion, a serious table serialization routine like my
> DataDumper [1][2] should be present in every Lua environment, because
> it is so common and useful to print tables in a readable way.

Tables are everything in Lua, and there is no one best way that suits
all applications.

Your DataDumper is useful because it is supplied as Lua code and can
easily be modified. I like doing the final table.concat in the calling
program, I don't want 'return', I don't want the exact name DataDumper
to go directly into the global namespace, I don't want tables dumped
recursively to any depth — but that's fine, I can change my personal
copy of DataDumper.

So I say, yes, a serious table serialization routine like DataDumper
should be present in every Lua environment, but no, it should not be
provided in a prebuilt library.  It's good enough to be able to
download it from LuaWiki.

Dirk