Hacker News new | ask | show | jobs
by dingxiong 1066 days ago
hmm. why are Lua arrays 1-index based?
2 comments

Because arrays start at 1, offsets start at 0
Arrays are just a sequence of objects.

Indexes (traditionally) start at 1, offsets (measures from base) obviously start from zero.

good enough for Rome