lua-users home
lua-l archive

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


> By providing an array type, Lua can preallocate an array of TObjects (or
> whatever they are) based on the size specified by the user.  To insert an
> object into that array is as simple as array[index] = TObject.  Retrieval is
> equally as simple.  Lua will run far quicker when using indexed access and
> make it perform even better in the benchmarks.

Can't an array type be defined from C?  It might not have all the best
syntactic integration with lua, but having a arraylib.c to add to lua would
be great and if everyone used it then it could become standard.  I'd use it
in some cases, but don't see any reason to go adding it to the standard
language now.

Russ