lua-users home
lua-l archive

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

Dirk Laurie wrote:
> Cheap alternative: Fixed-length table. Length defined once for all. Larger
> indices treated as non-numeric. This may actually cover quite a large
> number of actual use cases

This was the pre-5.1 way, where the length could be either stored in an
'n' field or in an internal table property.

Out of curiosity, does anyone have links to discussions why the
possibility of storing the length in a field of the table (as `t.n`)
isn't used anymore?  Why doesn't the default length operator check for
`t.n` first before doing the binary search?

Best regards,

David Kolf