lua-users home
lua-l archive

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



On Feb 02, 2005, at 00:08, Mark Hamburg wrote:

I'm not particularly enamored of super calls but some programming styles
really expect them to at least some extent.

Yes. I would venture that most mainstream ones do use 'super' in one form of another.

I even use it myself :P

http://alt.textdrive.com/lua/19/#c000013
http://dev.alt.textdrive.com/file/lu/MyOtherClass.lua

One er, rather, er, interesting aspect of this specific implementation is that you could 'skip' a hierarchy altogether:

    this.dwim = function()
        -- do additional stuff

        return this.super().super().dwim()
    end

Note the 'super().super()' call. The same applies to both class and instance methods.

Cheers

--
PA, Onnay Equitursay
http://alt.textdrive.com/