Since now there is no difference between {} and [], it's impossible to implement a stable Array.isArray. Transpling array literals to setmetatable({}, ____arrayMetatable) gives required data for Array.isArray and doesn't affect performance too much.
A major issue is that there would be a need for a new decorator (or a type) to mark functions that return standard lua arrays, and then set the metatable of returned values.
Since now there is no difference between
{}and[], it's impossible to implement a stableArray.isArray. Transpling array literals tosetmetatable({}, ____arrayMetatable)gives required data forArray.isArrayand doesn't affect performance too much.A major issue is that there would be a need for a new decorator (or a type) to mark functions that return standard lua arrays, and then set the metatable of returned values.