[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Object binding comments wanted
- From: David Given <dg@...>
- Date: Fri, 23 Sep 2005 15:04:37 +0100
On Friday 23 September 2005 12:35, Adam D. Moss wrote:
[...]
> I don't really know what you mean about dropping into Lua to look up
> every method call. I don't imagine that every combination of interfaces
> is actually used by objects - make a table which is shared by each
> 'class', which is what you really have there, not one big table shared
> by every class which is then filtered per-object.
Well, the actual class isn't important --- it's the interfaces implemented by
the class that's important. Think Java; we have an object that implements
Vector and Synchronisable, therefore we need to generate bindings for those
particular methods, while the fact that this is actually an instance of
my.dodgy.app.Fnord is irrelevant. (Actually, our objects are probably going
to implement about four interfaces each.)
But I see what you mean. If I generate a seperate dispatch table for each
*combination* of interfaces, then I should get reasonable speed *and* memory
efficiency (because the number of objects in use should vastly outweigh the
number of dispatch tables). Hmm...
--
+- David Given --McQ-+ "If you're up against someone more intelligent
| dg@cowlark.com | than you are, do something insane and let him think
| (dg@tao-group.com) | himself to death." --- Pyanfar Chanur
+- www.cowlark.com --+
Attachment:
pgpWr5BKaPzsu.pgp
Description: PGP signature