Hacker News new | ask | show | jobs
by jbluepolarbear 1111 days ago
You can change the offset in the Lua C source. It’s gonna break every single table you reference, but you can use your 0 based indexing in your scripts. Why though? I’ve used Lua for over 10 years and never had an issue with the 1 based index (I mostly use 0 based in c like languages.) I’ve never worked with anyone that cared about the 1 based indexing beyond their initial introduction to the language.
1 comments

I make off-by-one errors embarrassingly often, no matter if it's 0 or 1 based. Maybe I should try 2-based indexing.