lua-users home
lua-l archive

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

Some quick notes:

* Oberon-2 and Component Pascal both insist that one name the receiver and
use that name throughout the method. On the other hand, you can use a one
letter name and I also can't point to Oberon-2 and Component Pascal as being
wildly successful.

* I can see the issues with inheritance but I've also been weaning myself
from using inheritance.

* My biggest problem using Lua for object-oriented style programming has
been typing "." instead of ":" when invoking a function. I understand why
"." can't just do the job -- sometimes you do just want a table entry
containing a function pointer. I've been contemplating adding a syntactic
option that would allow me to write:

    myObject << message(...)

This would be sugar for either:

    myObject.message( myObject, ... )

Or for:

    if myObject then
        myObject.message( myObject, ... )

The latter picks up on Objective-C's ability to send messages to null

Or maybe I'll just learn to be more careful about "." v ":".