lua-users home
lua-l archive

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


On Fri, 13 Oct 2006 17:31:28 +0200
Adrian Perez <moebius.lists@gmail.com> wrote:

> On Thu, 12 Oct 2006 16:24:21 -0700
> "Zed A. Shaw" <zedshaw@zedshaw.com> wrote:
> 
> > Looks good.  What's the license on it though.  Seems people do three
> > things in Lua:
> > 
> > 1) Write their own OO system.
> 
> Haha ;-) Here's mine, for Lua 5.1:
> http://code.connectical.net/kicker/modules/object.lua
> 
> > 2) Avoid the words "[Cc]lass", "[Oo]bject", and "new"
> 
> No "[Cc]lass" keyword, but I'm using "Object", because of the
> prototypical nature of the system. That's also why I use "clone()"
> instead of "new()".
> 
> > 3) Not put a license on it.
> 
> lol, so mine is different because it *has* the licensing terms
> embedded: the MIT license, like Lua itself (I really appreciate that
> Lua made me discover this nice and concise license :-P).
> 
> > Are there particular reasons for this?  Like, "class" is reserved or
> > clashes?
> 
> I suppose it's just a matter of personal preferences :-P

P.S. I nearly forgot about this: You will need the reflect() function
from http://code.connectical.net/kicker/bindings/sys/reflect.lua, or
just comment out the __tostring metamethod ;-), but inspecting objects
from the interactive interpreter is nice (I always liked that feature 
from the Python interpreter!)


-- 
Futility Factor: No experiment is ever a complete failure - it can
always serve as a negative example.

Attachment: signature.asc
Description: PGP signature