lua-users home
lua-l archive

Re: Does PIL (3rd edition) repeatedly misuse the length operator on tables and invoke undefined behavior?

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


On 2014年09月18日 00:16, Steven Degutis wrote:
An empty table is a still considered a sequence
Hmm. I don't think that's immediately obvious from the definition
of a sequence:
"We use the term sequence to denote a table where the set of all
positive numeric keys is equal to {1..n} for some integer n, which
is called the length of the sequence (see §3.4.6)."
The most natural reading for me is that a sequence has at least
1 as a positive numeric key.

AltStyle によって変換されたページ (->オリジナル) /