Posted 07 January 2015 - 11:59 PM
After returning from learning java at scool, I started to look at Lua again.
Good old lua.
And now I want to get around object-oriented programming in lua
Good old lua.
And now I want to get around object-oriented programming in lua
- but I don't get if there is something like a standard constructor, or if you just have to make one and call it something like new()? [answered]
- how do you define an object? [answered]
- how do you properly use metatables?
- are there any important convensions regarding objects and lua?
- instance variables are stored in an arraylist, passed back by the constructor.
- inheritance uses metatables.
- ":" is used instead of the "." in java.
- "self" is used instead of "this" from java.
Edited on 07 January 2015 - 11:26 PM