View Single Post
05-15-19, 04:42 PM   #3
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,323
Essentially, what metatables do is allow you to define how a table reacts to different operations and even tag on some default values. The true power of metatables is an advanced topic. Many only use them to build structures similar to classes, but you can use them to hook/filter content, tweak how garbage collection works on the table and/or its contents, define what happens in math and comparison operations, and many more.



Originally Posted by Vlad View Post
Just a link to the official documentation. https://www.lua.org/pil/13.html
PiL is a good introduction to Lua. If you want more detail, I'd suggest the reference manual.
http://www.lua.org/manual/5.1/manual.html#2.8
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote