[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: inheritance and sub-tables
- From: Javier Guerra Giraldez <javier@...>
- Date: Wed, 26 Feb 2014 16:39:28 -0500
On Wed, Feb 26, 2014 at 4:21 PM, Andrew Starks <andrew.starks@trms.com> wrote:
> As Javier said: Lua doesn't have objects. But, you can fake them really well. :)
wowowow, i never said that!
one, Lua does have objects... every value is an object, be it OOP or not.
two, these OOP implementations aren't "fake" in any way, they're just
as real as those on C++, or JavaScript. just because it's not
pre-built, it's nothing 'lesser', or second-class!
what I said (and repeat) is that Lua doesn't have inheritance, but
it's easy to implement it. Since the problem at hand was a confusing
implementation, i felt it was important to separate it.
now, i'll add (once again) that inheritance is overrated, and only
really needed for static type languages. i'm much happier with OOP in
Lua when there's no OOP library on sight, just a simple and concise
writing style :-)
--
Javier