News for hackers. Stuff that matters.
Re:Lua: the world's most infuriating language? by ansible on Friday October 18, 2013 @10:39AM (#6571594)
To me, Lua's most annoying feature is that tables are the only data structure. When I was first learning Lua, I thought it was pretty cool to have one and only one very versatile data structure. Nowadays, I find it's more trouble than it's worth.

To me, this harkens back to the debate about the length of a table if it has nils in it.

The Lua table is not the be-all and end-all of data structures (though it is quite versatile out of the box). However, it can be the basis for any kind of data structure you can imagine. Trees of all varieties, priority queues, etc.. The strength of the language is that there is just one fundamental data structure, and it is implemented well, and it has good syntax support in the language. There is no mental overhead like with Python where you have to use square brackets for lists and curly braces for dictionaries.

Re:Lua: the world's most infuriating language? by nimble on Friday October 18, 2013 @11:11AM (#6571797)
> There is no mental overhead like with Python where you have to use square brackets for lists and curly braces for dictionaries.

Seriously?

Re:Lua: the world's most infuriating language? by kazagistar on Friday October 18, 2013 @11:28AM (#6571906)
He forgot to mention objects, which are also almost-dicts in python, but with a ton of magic rules like slots and methods storing their object when assigned and whatnot.

Lua has pretty nice and lightweight prototype OOP, which boils down to a few uses of : instead of . on tables and setting the __index of the metatable to be the parent table.

That's not to say python is not an excellent language, just that lua is a lot simpler.