Difference between revisions of "lol.lua"

(Creating page.)
 
m (Added "Class" keyword)
 
Line 2: Line 2:
 
{{#set:LOVE Version=Any}}
 
{{#set:LOVE Version=Any}}
 
{{#set:Description=Object prototyping library for Lua.}}
 
{{#set:Description=Object prototyping library for Lua.}}
 +
{{#set:Keyword=Class}}
  
 
'''lol.lua''' is an object prototyping implementation for Lua. It features '''cloning''', '''copying and deep copying''', and '''dynamic prototyping'''.
 
'''lol.lua''' is an object prototyping implementation for Lua. It features '''cloning''', '''copying and deep copying''', and '''dynamic prototyping'''.

Latest revision as of 04:29, 2 June 2021



lol.lua is an object prototyping implementation for Lua. It features cloning, copying and deep copying, and dynamic prototyping.

Example:

local lol = require('lol')

local point = lol:clone()
function point:init()
    self.x, self.y = 0, 0
end

local p = point:clone()
print(p.x, p.y) -- 0    0



Grab it on Github.