why does first example constructor set `__index` on `self`?

前端 未结 0 905
花落未央
花落未央 2020-12-19 07:49

I am just starting to look at Lua, and I\'m looking at the introductory Lua example for "classes".

Account = {balance = 0}

function Account:new (o)         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题