Personally I feel like it would lead to more confusion (strangely, people think tables being a merge of arrays and objects being confusing) because tables are already optimized for array sections, right? I feel like the only change that would make sense is perhaps syntax-assisted `table.remove` and `table.insert` to remove the overhead of repeated indexing of `table` - but this is already achievable using bytecode- and manual-optimization.
Hi,
I was looking to see if Lua ever had a distinct array type, and
reading the hopl paper it seems that Lua 1.1 indeed had distinct array
and table types but the two types were merged to a single table type
in Lua 2.1.
I think the Lua team believe this was the right decision - at least
that is the impression I get from various talks given by Roberto. I
wonder if the language would be more powerful if it had a distinct
array type.
I am not suggesting any change here ... as I believe it is never going
to happen. But I would be interested to know what Lua users think.
Regards
Dibyendu