Hacker News new | past | comments | ask | show | jobs | submit login
Interfacing DLang with C: Getting Started (dlang.org)
47 points by philonoist on Dec 9, 2017 | hide | past | favorite | 5 comments



Many languages have the ability to interface with C via FFI, but based on my experience, D's interop is really seamless. In addition, DStep converts .c/.h to .d/.di so there's very less manual work involved.

May be reserved for future article, but C++ interop is where D just excels. No other language can match that!


> C++ interop is where D just excels

Documented C++ interop would be even better.


So.. Calypso?

https://github.com/Syniurge/Calypso

And plenty of C++ code actually already works in the mainline branch.

You'd be hard pressed to find other languages that are as developed as D and support C and C++ so natively. C is 100%, and support for C++ is definitely growing every year.


The stuff that is guaranteed to work is already documented on dlang.org. However, there has been more work done than was - I haven't checked in weeks - documented e.g. dmd can apparently catch C++ exceptions (but not in release) so the documentation does not mention this.


It looks like the documentation has been updated since I last checked.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: