[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Need good examples of when prototype-based objects are better
- From: Matthew Wilson <matt@...>
- Date: Tue, 16 Oct 2007 18:47:21 +0000 (UTC)
On Tue 16 Oct 2007 02:39:00 PM EDT, Jerome Vuarand wrote:
> Matthew Wilson wrote:
>> I think I understand how the object system in lua works. Are there
>> any classic examples that show how a prototype-based system surpasses
>> the model used by C++ and Java?
>>
>> I'm trying to win over some skeptics to Lua, and the object system
>> gets a lot of discussion.
>
> Lua itself does not have an object system. You can do both
> prototype-based or class-based OOP in Lua, it's up to you. You can even
> mix both if it suits your needs.
>
OK, I understand that I can implement class-based OOP in Lua. Can you
provide any analysis on when prototypes are better or worse than
classes?
Matt