Self Summary: Lua Language(two useful links) and the difference between : and .

Here is a very useful website about learning Lua: http://tylerneylon.com/a/learn-lua/


Also, here is a detailed teaching link: http://www.lua.org/pil/contents.html


Here I just want to talk about the difference of : and . in Lua: 


Function tablename:fn(...) is the same as function tablename.fn(self, ...). The : just adds a first arg called self.


Class behaviour is built upon the basis of table in Lua. For details please turn to the website. 

你可能感兴趣的:(object,programming,lua)