[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: "Alex Queiroz" <asandroq@...>
- Date: Tue, 16 Oct 2007 15:40:09 -0300
Hallo,
On 10/16/07, Matthew Wilson <matt@tplus1.com> 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?
>
Lua has not a prototype-based object system a la JavaScript. But
it happens that it can easily be implemented with metatables.
Everybody that needs object end up implementing their own object
system, which tend to differ in subtle ways.
Read the Lua manual, there is no mention of classes or inheritance.
Cheers,
--
-alex
http://www.ventonegro.org/