Y
Hacker News
new
|
ask
|
show
|
jobs
by
dingxiong
1066 days ago
hmm. why are Lua arrays 1-index based?
2 comments
nmz
1066 days ago
Because arrays start at 1, offsets start at 0
link
defrost
1066 days ago
Arrays are just a sequence of objects.
Indexes
(traditionally) start at 1,
offsets
(measures from base) obviously start from zero.
link
MathMonkeyMan
1066 days ago
good enough for Rome
link