Interfacing D To Legacy C++ Code
NWCPP - Northwest C++ Users GroupCited 3× on HN, 2016–2019
talk · advanced · 2016–2019 on HN
Walter Bright explains to the Northwest C++ Users Group how the D programming language can interface directly with legacy C++ code. He covers why C++ is hard to interface with and how D approaches the problem.
HN uses it as evidence that D has unusually good C++ interop and as Walter Bright's account of the challenges D is tackling.
Up next
11 mo on HNCppCon 2015: Andrei Alexandrescu “std::allocator...”
CppCon
7 HN recommender · 2017–2025
12 mo on HNLexical Scanning in Go - Rob Pike
GoogleFOSSSydney
13 HN recommender · 2012–2025
10 mo on HNCppCon 2017: Matt Kulukundis “Designing a Fast, Efficient, Cache-friendly Hash Table, Step by Step”
CppCon
9 HN recommender · 2018–2026
9 mo on HNRustConf 2018 - Closing Keynote - Using Rust For Game Development by Catherine West
Rust Programming Language
9 HN recommender · 2018–2023
10 mo on HNCppCon 2016: Jason Turner “Rich Code for Tiny Computers: A Simple Commodore 64 Game in C++17”
CppCon
13 HN recommender · 2016–2024
9 mo on HNIdeas about a new programming language for games.
Jonathan Blow
7 HN recommender · 2014–2025
9 mo on HNCppCon 2014: Mike Acton "Data-Oriented Design and C++"
CppCon
9 HN recommender · 2015–2026
9 mo on HNHow I program C
Eskil Steenberg
8 HN recommender · 2017–2025
9 mo on HNGoogle I/O 2012 - Go Concurrency Patterns
Google for Developers
9 HN recommender · 2012–2025
7 mo on HNCppCon 2015: Kate Gregory “Stop Teaching C"
CppCon
7 HN recommender · 2016–2025
7 mo on HNZig: A programming language designed for robustness, optimality, and clarity – Andrew Kelley
Recurse Center
6 HN recommender · 2018–2024
7 mo on HNCppCon 2014: Chandler Carruth "Efficiency with Algorithms, Performance with Data Structures"
CppCon
7 HN recommender · 2014–2024
3 comments from Hacker News
Another alternative, I think is D-language bindings to QT (or betterC which is a subset of D allowes to use D with C runtime library, while retaining D-s class system, templates and memory safety). [1] link D's team is doing an incredible job of matching C++ compiler specific ABIs, name mangling/etc -- just so D users can use C++ libraries (including templates) directly from D without loosing the features of the language. [2] link Here is also an older video of Walter Bright (2015) talking about the challenges that D is tackling [3] ▶ this video
Rust does not have native C++ interop. C ABI is different to what clasp has done (native C++ interop). All widely used Common Lisp implementations have seamless C ABI interop through their FFIs / CFFI [1]. Clasp goes above and beyond that and natively interfaces with C++. LTO works with mixed Common Lisp and C++ code. Exception handling works as expected. You can mix Common Lisp and C++ stack frames. Correct me if I'm wrong but Rust does not have anything equivalent. The language that comes closest is D I think [2]. [1] link [2] ▶ this video
Reasons for D: It is a way out of the C++ tar pit, because it does C++ interop better than any other language. D needs to continue to outrun C++ evolving, though. See link or ▶ this video It has powerful meta-programming. It is effectively the opposite of Go, which does not even have generics. This certainly provides foot shooting as well, so other languages (e.g. Rust) are more conservative with that. D examples: link Those are the two reasons, which D has ahead of all other languages (ok, not Lisp wrt meta-programming). If you compare it to another specific language, there are more things to talk about.