lua-users home
lua-l archive

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


On 3 November 2015 at 06:20, Dirk Laurie <dirk.laurie@gmail.com> wrote:
>> local Employee : [] = { 'dibyendu', 'majumdar' }
>>
>> Above could be how an array of dynamic types is declared.
>
> What performance benefits do you see in static-typing an array but
> not its entries?
>

The main idea is to be able to inline the code generated for GETTABLE
and possibly SETTABLE. To do this the parser needs to know that the
indexing is being done on a table, and the index is an integer.

Regards