lua-users home
lua-l archive

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

It can be nice to override the __tostring metamethod so that
print(table) is nice and readable.  The only downer is that you lose the
ability to get a string that uniquely identifies your table, which can
be very useful.  You can unset the metamethod, call tostring(), and then
reset it, but that's kind of hacky.

Does it seem reasonable that there would be a rawtostring(), as there is
a rawget() and rawset()?