lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


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.

On Sat, Jun 24, 2017 at 5:58 PM Dibyendu Majumdar <[email protected]> wrote:
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

--
--
Ryan <[email protected]>
Software Developer / System Administrator
https://hashbang.sh