See https://github.com/fredreichbier/ooc-lua/blob/master/samples/cache.lua#L9:
When E.hello is called, howling actually asks the superclass, D for hello and gets a function. howling then returns a function that casts its first argument (this) to D* and otherwise relays the call to the function it got from D.
The problem: D does the same for C, which does the same for B, which does the same for A. So we end up with a function chain that casts its first argument to D* first, then C*, then B*, then A*. That's four nested functions and casts.
It's not pretty, and might actually cause performance problems.
See https://github.com/fredreichbier/ooc-lua/blob/master/samples/cache.lua#L9:
When
E.hellois called, howling actually asks the superclass,Dforhelloand gets a function. howling then returns a function that casts its first argument (this) toD*and otherwise relays the call to the function it got fromD.The problem:
Ddoes the same forC, which does the same forB, which does the same forA. So we end up with a function chain that casts its first argument toD*first, thenC*, thenB*, thenA*. That's four nested functions and casts.It's not pretty, and might actually cause performance problems.