Metatables - What on earth do they do?

So I have been using Corona and Lua for quite a few months.

I see METATABLES being used very frequently in many libraries shared in the community.

Apparently they are supposed to be very powerful, but I have absolutely no clue on what they do.

Can someone point me in the right direction on how to use METATABLES? [import]uid: 64174 topic_id: 24265 reply_id: 324265[/import]

To understand what a metatable is used for you might want to be familiar with what a prototype based language is.

In Javascript, you would use the prototype chain to accomplish the same thing.

You can also look at lua documentation.

If you are not familiar with the concept your going to need to do some reading.

Here is post by another dev trying to understand lua metatables.
[import]uid: 106158 topic_id: 24265 reply_id: 98066[/import]

Ah thanks!
Will do some reading. [import]uid: 64174 topic_id: 24265 reply_id: 98215[/import]