Best way to use large C library in D as of 2024
Chris Piker
chris at hoopjump.com
Fri Apr 12 18:45:21 UTC 2024
On Monday, 1 April 2024 at 02:08:20 UTC, Lance Bachmeier wrote:
> On Saturday, 30 March 2024 at 05:01:32 UTC, harakim wrote:
> It works well if you only need to work with a header. There are
> still a few rough edges that get in the way if you're compiling
> the full C sources (I filed bugs for all of them):
>
> - Can't handle va_arg
> - Can't cast to a pointer of a struct that's typedef'd
> - Can't use complex numbers with the ternary operator
>
...
> Once these final odds and ends are working, we have a killer
> language feature.
Even though DMD can't compile some C code, that's pretty much a
non-issue for me anyway. In my environment the servers are all
Linux so "apt-get" (or equivalent) typically provides a
pre-compiled dependency. Being able to list a package as a
system dependency and then just call it from D with no interface
code is a Big Freaking Deal!
Compared to Python interfaces this is a huge improvement. It
makes D an even better replacement for the mixed mode python + C
development I was doing before switching to D for new projects.
More information about the Digitalmars-d-learn
mailing list