lua-users home
lua-l archive

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

Hi list,

I just added lots of documentation, including box diagrams and a
detailed example of use, to the OO mechanism that I've been using for
years, whose main part is just these these five lines of Lua code:

  Class = {
      type   = "Class",
      __call = function (class, o) return setmetatable(o, class) end,
  setmetatable(Class, Class)

The code and the comments are here: (htmlized)      (original)

I guess that most people here will find it almost offensibly simple
but I have hope that some people will find the box diagrams and the
reduction diagrams in its documentation inspiring... maybe even to the
point of creating box diagrams for some of the OOs here:

Cheers =),
  Eduardo Ochs