lua-users home
lua-l archive

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


| > | I think that if you're likely to want a key called "n", then you shouldn't
| > | be putting it in a getn-able table (which is generally a list). It's
| > | sometimes nice to be able to put a list and other elements in the same
| > | table, but unnecessary.
| >
| > The functionality is there to mix it and it is often convenient to use. It's
| > almost encouraged! eg. FnBlah{ 1,2,3 ; n="bill" } . Why should I have to
design
| > round a clumsily named table member variable?
|
| Equally, why should the number of number-keyed items in a table be
| special? I think it's probably better not to encourage this form of
| programming (perhaps by dropping support for the syntax you give
| above; I've certainly never used it).


Are we moving onto a discussion about programming style now? :-) The fact is the
language supports this syntax, and from the look of other postings today it is
used. I dont have a problem with this mixed functionality really, all I would
like is for "n" to be renamed (eg. "__n__" better but not perfect) or setn() to
be added (probably better).

N