[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Possible language extension: colon-notation in an expression as shorthand for instance-specific method
- From: Javier Guerra <javier@...>
- Date: Tue, 27 Jan 2009 14:07:27 -0500
On Tue, Jan 27, 2009 at 12:36 PM, Dolphin <dhawkins@netstreams.com> wrote:
> Coming from a constrained memory environment, that is really scary as you are
> creating two tables, a closure and a vararg function, a lot of overhead IMO. I
> do love however, that lua provides the functionality to do things like this, I
> just wish you could do it cheaper.
there's significant overhead, but could easily be reduced to one
global table, one table per object instance, and one closure per
instance method that's actually used.
roughly what the original poster had in mind, and not too different
from the closure-based OOP mentioned by David Given. it's, in fact, a
lazy implementation of the same. very similar to how Python works.
--
Javier