3 ms·
"C arrays are zero-based, so the indexes have to run from 0 to n-1. One might want to allocate one more element instead to simplify converting legacy code." Fr
by boxmonster 6y ago
"C arrays are zero-based, so the indexes have to run from 0 to n-1. One might want to allocate one more element instead to simplify converting legacy code."
From https://luajit.org/ext_ffi.html https://luajit.org/ext_ffi.html
I am not a Lua programmer, but if most of the languages you will interface with are 0 based such as C, it seems like an unnecessary worry to use 1 based