Comment

Comment by andrewmcwatters

It is inevitable that people complain about Lua's 1-based "tables" which serve as both arrays and hash maps.

I usually encourage people to remember the practical origins of 0-based arrays when thinking in terms of pointers, where 0-based counting is useful in terms of talking about offsets from a point in memory, as contrasted to 1-based counting where you are primarily talking about quantities of collections.

Lua is a great language. My only wish is that it was easier to do multithreaded work in it. Unfortunately, this is not the case without some significant architectural forethought.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton