[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: LuaPlus popularity
- From: Tim Mensch <tim-lua-l@...>
- Date: Mon, 27 Sep 2010 14:25:07 -0600
On 9/27/2010 1:11 PM, Rob Kendrick wrote:
On Mon, Sep 27, 2010 at 01:01:36PM -0600, Tim Mensch wrote:
> >Conversely, the number of people who turn up on #lua because they can't
> >get some automatic binding tool or C++ wrapper to do what they want is
> >astonishing. Especially when doing it using the C API is often a 5-line
> >job, most of which is boilerplate.
> Not anywhere near five lines if you're doing anything complex;
My argument is to not do that, then :)
Sigh. Different goals.
I said "nearly a hundred," and said nothing about it being all in one
class. You seem to throw a lot of mud at APIs you've never seen, and
that you have no experience with, based on incorrect assumptions you've
made about them. And the goal of Playground was NOT to do everything in
Lua, so you're just AGAIN talking about how you have a different goal,
and seemingly concluding that all other goals (and paths) are invalid.
Your goals are fine for your projects; other projects have other goals.
Again, I'd suggest that a class with hundreds of member functions might
require... reworking. Additionally, such verbatim bindings often result
in disappointing experiences when used from inside Lua, which is why I
always implement a wafer-thin binding, and then make everything look
lovely from Lua.
You know what functions that the standard Lua API can bind. So do I.
Ignore the word "global"; it wasn't precise (I wasn't referring to
extern vs. static, for example), and seems to be confusing. Replace
"only global C functions" with "functions with the standard signature",
and it will make more sense.
> AND...the wrappers available leave some usability (or performance)
> to be desired. On this we can agree. :( In this particular case, the
> LuaPlus Call Dispatcher (which can be used without using LuaPlus,
> btw) is one of the easier to understand -- its interface looks very
> much like the standard Lua C interface, only it can takes class
> member functions and a "this" pointer instead of only global C
Only global C functions? I'm not sure what you mean by this.
LuaPlus CD can take C++ class member functions with whatever signature
you like (with restrictions on parameter types, of course) and map them
directly to Lua.
I get that YOU don't want to do that. Fine. We have different goals. I
said that already, and you just keep telling me that I and others who
want to use more sophisticated bindings have (or had, in the case of
Playground) the wrong goals. And that's not for you to say. Heck, in the
case of Playground the goals weren't even for ME to say -- they were
handed down by the CTO based on business requirements.