lua-users home
lua-l archive

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

>> No roadmap, published or otherwise. Do you have any special

I'm still new to Lua, so maybe this is already possible.  Just recently,
I needed a way to have code call the derived class/table from the base
class/table.  If I was using C++ I would have used a virtual function.
This would be a nice addition to the language if it's not already there.

I can give an example in the context of a game (I'm not a game
programmer).  One could write all of the AI of a human in a human
class/table and the AI would call certain methods of the derived
class/table to just do what makes the human different from the rest.
For example, if the AI calls look around, the soldier would just turn
he/her head; whereas, a human with binoculars would use the binoculars
and turn the head.