News for hackers. Stuff that matters.
Re:Lua: Good, Bad, and Ugly Parts (2012) by afiori on Monday December 27, 2021 @04:20AM (#29700890)
It is about embedding how easy it is to embed lua, so you should be able to use the host conventions
Re:Lua: Good, Bad, and Ugly Parts (2012) by anothernewdude on Monday December 27, 2021 @04:39AM (#29700996)
Oh wow, that does make the non-standard array references rather catastrophic.
Re:Lua: Good, Bad, and Ugly Parts (2012) by afiori on Monday December 27, 2021 @05:03AM (#29701133)
you wrap the host across the embedding boundary so that the host and lua can either use their own convention or have access to a special object that explicitely and clearly exposes the other convention.

In general using array indexes as foreign keys should always be considered carefully.

And if all you will be doing is iterating then the starting index doesn't really matter (unless you copy paste loop logic, which is a problem in itself)

Re:Lua: Good, Bad, and Ugly Parts (2012) by afiori on Monday December 27, 2021 @12:21PM (#29704425)
Errata: you wrap the host across -> you wrap the array across