I feel like table.create is going to be underrated, but that update looks amazing. I assume that the memory allocation is done on the backend instead of whenever you create a table? To get around this, I currently construct tables with placeholder values or initialise members with placeholders.

-- Construction with a size of 8 local array = {1, 1, 1, 1, 1, 1, 1, 1} -- Construction with members local dictionary = { Test = 1, Other = 1, }

Does table.create work in around the same manner as the first sample? That is, constructing a table with a size of n and any elements above n cause the table to resize and reallocate. It’s not quite clear if this creates a fixed-size table or if standard resizing behaviour is implied.

As for table.find, I like this. It prevents me from always having to write a custom iterator or extended table library in pure-Lua (iirc backend calls are faster) as shown:

local function findIndexForValue(targetTable, targetValue) for index, value in ipairs(findTable) do if value == targetValue then return index end end return nil end

There’s still going to be cases where that’s necessary, such as working with dictionaries, but at least the work is saved when working with arrays.

Will this stop the menace of scopes being opened in comments? I’d actually like to use brackets, quotes and the word function, for example, in my comments again.