Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

In fact, I'm learning a lot from this thread, particularly about idiocy and sarcasm, although very few actual real arguments for why array[1] is 'inferior' to array[0], because in fact there is no such valid argument.

Lua standard libraries do not suffer this problem. If you have a legacy / cross-platform issue about it, well then .. its a good thing one is 'wise enough to know array[0] is a thing', but its hardly relevant to the question of whether this 'inferior accessing of arrays in Lua' is anything more than fallacy.

Idiomatic Lua involves intelligent use of pairs/ipairs/table index schema, and metatables if needed, to solve the data-access problem. And guess what? A competent Lua developer either has had zero problems with this issue (because they are competent and know how to wire up a C/C++ data structure to the Lua vm), or they have infinite, multiple "problems with Lua", of their own devising, nevertheless, but hey .. you can't "blame Lua" for that. Lua gives you the keys to the universe. If you crash into someones mailbox, well then ..



Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: