[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Timers, Callbacks & Swig
- From: Miles Bader <miles@...>
- Date: Wed, 23 Feb 2011 14:39:14 +0900
Sam Roberts <vieuxtech@gmail.com> writes:
>>> I have the impression swig works better when binding C++ to an object
>>> oriented language,
>>
>> I think that's a mistaken impression. Swig does a _very_ good job
>> binding Lua and C++. It almost always does "the right thing", so one
>> doesn't have to worry about it most of the time.
>
> Uh, Miles, you said you think I've a mistaken impression...
Hmm, I thought your implication was that Lua wasn't an object-oriented
language and thus using swig to bind C++ to Lua didn't work so well.
So you were really saying using swig to bind C to Lua doesn't work so
well?
In that case, I dunno; clearly swig doesn't have as big an advantage as
with C++ interfaces, and its various problems are relatively bigger, but
still... for a biggish interface, it seems much easier to copy a bunch
of header-file contents and tweak them than write a bunch of hand-rolled
interface thunks -- even if the latter is _straightforward_, still, it's
work...
As usual, YMMV, depending on the details of the interface.
For _small_ interfaces, I'd just hand-roll it, as of course that gives
you the most control, and avoids dependencies.
-mile
--
Sabbath, n. A weekly festival having its origin in the fact that God made the
world in six days and was arrested on the seventh.
- References:
- Timers, Callbacks & Swig, Jeff Smith
- Re: Timers, Callbacks & Swig, Steve Litt
- RE: Timers, Callbacks & Swig, Jeff Smith
- Re: Timers, Callbacks & Swig, Alexander Gladysh
- RE: Timers, Callbacks & Swig, Jeff Smith
- Re: Timers, Callbacks & Swig, Sam Roberts
- Re: Timers, Callbacks & Swig, Miles Bader
- Re: Timers, Callbacks & Swig, Sam Roberts