lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On 11/21/2011 08:47 AM, Eduardo Ochs wrote:
> Hello!
> This is an announcement for the latest & greatest version of my OO
> system for Lua: "eoo.lua", at:
> Its core, in 5 lines of code, hasn't changed since the last release,
> but now its documentation has fantastic box drawings,
> ...

Looks good, though I have a couple of practical questions about it. A
common idiom in OOP is polymorphic overriding of functionality, that
involves making a chain of calls back to the base class. In a Object ->
Sprite -> Monster tree of inheritance, this kind of thing would happen:

function Monster:foo(x, y, z), x, y)
  self.z = z

function, y), x)
  self.y = y

  self.x = x

Is that how you would recommend doing it in your object system?