lua-users home
lua-l archive

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


Daniel Silverstone wrote:

Hi,

I have been working on a class and object heirarchy (I'll probably either put it on the lua-users.org wiki or write an LTN for it eventually) for my web application platform Aranha.

Hi,
Checked out the class subpage. One suggestion I have from a quick read
is that I prefer

ctr = Counter.New()    // well, really .new would be even better :)


from your sample syntax. For no better reason than I am used to doing
that in Ruby :) I think Ruby and XOTcl (
http://media.wu-wien.ac.at/whatIsXOTcl.html ) have the most intuitive
class / object systems. In particular you might look at XOTcl for ideas
since it leans towards "classes are a type of object" as in Lua,
Smalltalk etc. Both use class and object mixins and those are definitely
helpful for single inheritance systems IMO. Ruby's object system has a
nice simple syntax ( http://www.rubycentral.com/book/tut_classes.html )
that might give you some ideas for the one you are working on.

Looks interesting, though!

Brennan