A gentle critque..
Bill Baxter
Bill_member at pathlink.com
Fri May 19 05:58:43 PDT 2006
In article <e4ji0l$hcl$1 at digitaldaemon.com>, Kyle Furlong says...
>
>Jarrett Billingsley wrote:
>> "Ben Cooley" <Ben_member at pathlink.com> wrote in message
>> news:e4it0v$3p9$1 at digitaldaemon.com...
>>
>>> Not being able to use any existing C or
>>> Cpp at all makes even less sense to me.
>>
>> YOU!
>>
>> CAN!
>>
>> LINK!
>>...
>>
>> Did you miss that somewhere?
>>
>>
>
>Seriously, this has been pounded back at you (Ben) for many posts.
>Listen to what we are saying.
I think Ben gets that point just fine. Yes, you can link with C. *But* you
need to rewrite the header in D first. Which isn't quite the same as being able
to "use existing C". Granted the manual labor to use C from D is less than for
using it from Java or Python, but still, there's some manual labor involved.
Anyway, if you've been reading his posts closely I think it's pretty clear that
he's primarily concerned with C++, anyway, and not so much C. But if his grand
plan for C++ via GCC-XML works out, then C will be taken care of too as a
by-product.
Anyway, there's no reason to jump all over the guy for wanting to make D
interoperate better with C and C++.
My impression, though, is that what Ben wants to do is still pretty similar to
what SWIG already does. It's generating wrappers. In SWIG's case it generates
say a Python API plus some supporting Python and C++ glue code. In Ben's case
he's talking about generating a D API with D and C++ glue code (and maybe a
little assembly thrown in to manipulate vtables and such), but they're wrappers
nonetheless. So to me it makes most sense to either A) leverage SWIG and add
the necessary functionality it or B) start over from scratch with a completely
new wrapper generator tool based on GCC-XML. But if you're going spend all that
time making a new wrapper generator that's better than SWIG, why limit it to
only wrapping D? If you
By the way a search for "GCCXML wrapper generator" turns up this as the first
link:
http://www.digitalmars.com/d/archives/digitalmars/D/announce/113.html
The site for that is here: http://remy.moueza.free.fr/
Sounds like it was abandoned, but at he's got some experience on the problem,
and is likely to know where the really tricky parts are.
Cheers!
Bill Baxter
More information about the Digitalmars-d
mailing list