lua-users home
lua-l archive

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



On Friday, February 15, 2002, at 07:34  AM, RLake@oxfam.org.uk wrote:
Ooooh, this is so *almost* what I want. Can't we please, please have a next
tagmethod to go with it? It would be soooo simple... (Yes, I know I can
write for k, v in metatable(object).next do ..., but that means that I need
to either write that always or know whether or not object is a regular
table; that is not good for code maintainability.)

A getn() tagmethod would be really nice too. Basically, it would be nice to have userdata capable of replacing any value in Lua(particularly a table value). This way userdata for a database (like tdbm) can replace a table or a userdata that handles arbitrary length numbers could replace a number, etc.

Steve