lua-users home
lua-l archive

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


All,

 

I am looking at extending the multiple inheritance example in “Programming In Lua” (ch. 16.3).   I would like to support method chaining, i.e. at the point marked by a call to “next” , the next shadowed method on a “next-path” is searched and, when it is found, it is mixed into the execution of the current method (i.e. executed in the same scope and then execution of the original method continues). This is a more generic version of a call to super() in a Java constructor.  The idea for this is taken from XOTCL http://media.wu-wien.ac.at/.

 

My initial though is to have a root Object that handles the message “next” (I would be aiming for the “next-path” to be predictable (breadth first search), but any thoughts from more experienced lua programmers would be appreciated.

 

Regards,

 

Martin