lua-users home
lua-l archive

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


> This set of keys is {}, the empty set. It IS a member of the set of
> sets of the form {1..n}, with n = 0. (Try it with a for loop -- for n
> = 1, 0 do print(n) end -- and see that this is true.)

> Therefore, an empty table is a sequence, and it is a sequence of length 0.

The terminology is informal, but it is stretching the meaning of language
to argue that "sets of the form {1..0}" includes the empty set! Surely it is
just an
invalid (meaningless) construction (or arguably the set {1})?

The OP is right (but pedantic), to be watertight the manual needs to specify
that
any table with no positive numeric keys has length 0.

Attachment: smime.p7s
Description: S/MIME cryptographic signature