Comment by otikik
7 hours ago
That is absolutely not the case.
Numerical loops in Lua are inclusive:
for i=1,#t do t[i]=0 end
On the example above the i starts at 1 and goes up to (and including) the length of t.
With 0-based indexes, and that numerical loop format, it would be minus-one everywhere:
for i=1,#t-1 do ...
I don't see a contradiction? I specifically pointed out inclusive indexing as part of my complaint.
The funny thing is, you could say the end index is zero-indexed and exclusive and that would result in the same behavior as one-indexed and inclusive. It wouldn't make sense to make it zero-indexed and inclusive, because the inclusivity only exists in the first place to account for the one-indexing. That would be an incomplete and nonsensical conversion.