3 ms·
> It's too hard to use a C++ interface from any other language. D has the best support for this. It's not as simple as `#include <cppheader.hpp>` but it's bet
by atilaneves 9y ago
> It's too hard to use a C++ interface from any other language.
D has the best support for this. It's not as simple as `#include <cppheader.hpp>` but it's better than any other language at it. Name mangling matches, C++ exception support and C++ abstract classes can be declared as D interfaces and everything works.
> C++ really is unique in terms of offering zero-cost abstraction
Rust and D (at the very least) would disagree.
- chubot 9y agoOK, good to know about D. As far as zero cost, my understanding is that D is still trying to get rid of GC from the standard library. And I'm explaining why I think Rust is having a hard time getting adoption. It makes an effort to be compatible with C, but not with C++. But really C++ is its "competitor", not C. And C++ has the network / lock-in effect I described. All languages have a network effect to some degree (libraries, documentation), but I think the situation with C++ is especially acute. Also, I would say that safety and zero-cost abstractions are the goal of Rust. Those two goals conflict somewhat -- e.g. in the decision over bounds checking. Although I guess you can say that without bounds checking you have no abstraction; you just have a pile of buggy code at zero cost :)