lua-users home
lua-l archive

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


On 3/30/12, steve donovan <steve.j.donovan@gmail.com> wrote:
> And multiple inheritance .. I've never felt a need for this in Lua.

And I've never felt a need for classes in Lua.

In the most proeminent example where I felt I could use prototypes
(the PiL kind), I was traversing a directory tree with a recursive
function and needed to keep state across the paths. Eventually I added
a count argument and it resulted in a kind of a copy-on-write (but not
really copy) linked list.

Performance wasn't an issue and I felt it was an elegant solution.

Closures and coroutines go a long way.