Encapsulation in Warcraft Addons - Inheritance
Using Inheritance (sort of) When we actually need inheritance, things get a little more complicated. We need to use two of lua’s slightly harder features to get it to work: metatables and colon notation. A little background on these will help: MetaTables All “objects” in lua are tables, and tables can something called a metatable added to them. Metatables can have special methods on them which run under certain circumstances (called metamethods), such as keys being added....