Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

A Lua table is data structure which contains both an array and a hash map part i.e. it accepts both indexed and keyed entries. E.g.:

  myTable[1] = "red"

  myTable.name = "Color Codes"


For the actual language, there are no "parts". Every table is a map, and the implementation could do several things behind the scenes.

The issue is not knowing if the table can be encoded as an array, since that's more compact in many encodings.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: