D vs C++
"Jérôme M. Berger"
jeberger at free.fr
Mon Dec 27 13:19:36 PST 2010
spir wrote:
> On Sun, 26 Dec 2010 22:44:04 +0100
> "Jérôme M. Berger" <jeberger at free.fr> wrote:
>
>>> 8. direct interface to C
>> Cython gives it too: it is as easy to write a Cython interface
>> module as to write a D interface file for a C library.
>
> Hum, I do not agree at all. As I see it, D binds to C directly, Lua binds to C rather easily, Python binds to C "complicatedly". (Lua's C interface layer is far simpler than Python's, but it still cannot compare to D's direct calls in both directions. The only issue AFAIK is that types, qualifiers and conventions do not exactly match.)
>
cdef extern double fooC (int bar)
def fooPy (bar):
return fooC (bar)
I don't know how Lua binds to C, but I doubt it is any easier. Or
you could use swig which is even easier.
Jerome
--
mailto:jeberger at free.fr
http://jeberger.free.fr
Jabber: jeberger at jabber.fr
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20101227/af7a40bb/attachment.pgp>
More information about the Digitalmars-d
mailing list