News for hackers. Stuff that matters.

novemberisms

A lot of people who don't like Lua list "only having tables" as some sort of negative, but honestly I don't see how that is bad in any way.

1. Having only 1 data structure makes for a simpler, more elegant language. Once you understand tables, you understand everything you need to know about lua.

2. You could implement any other data structure with a table.

* A table is basically a dictionary / map already

* A table can be an array if you use numbers as keys. They don't even have to start at 1.

* A table can easily be made into a set if you use the elements of the set as keys and 'true' as the values.

* A table can be made into a proper OOP class with metatables

* A table can use prototypical inheritance too

* A table can act as a basic data record object

Those using the language don't really miss having the more specific data structures.