public
Description: Loonar: The flexible object system for Lua
Home | Edit | New

ObjectOrientation

This page outlines the high level concept of object oriented features in Loonar?.

class and object

object construction

Inheritance

Following is just imaginary pseudo code.


person = class {
  function(self, name, age)
    self.name = name,
    self.age = 26,
   end
}

employee = person.subclass {
function(self, name, age, role)
self.role = role
self.super(name, age)
end
}

Last edited by speedmax, Sat Aug 16 00:12:33 -0700 2008
Home | Edit | New
Versions: