[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: lua modules and OO
- From: Petite Abeille <petite_abeille@...>
- Date: Wed, 22 Jul 2009 21:33:04 +0200
On Jul 22, 2009, at 9:14 PM, Wesley Smith wrote:
After reading module v. dofile discussion I was curious how people
handle OO constructs as Lua modules.
A while back, this is what I used:
local LUObject = require( "LUObject" )
local super = LUObject
local self = super()
For example, a List object:
http://dev.alt.textdrive.com/browser/lu/LUList.lua
Some usage examples:
http://dev.alt.textdrive.com/browser/lu/Example.lua
Root object:
http://dev.alt.textdrive.com/browser/lu/LUObject.lua
But, after reflexion, I moved away from OO in Lua. Not worth the
bother :))
Cheers,
PA.