▲ | eric-p7 6 days ago | |
> That's what makes Carbon different from any other language: D, Zig, Nim, Rust etc. I know you can compile C++ files to object files, pass them to the D compiler, and have them call eachothers' functions. I've never tried it though. -------- g++ -c foo.cpp dmd bar.d foo.o -L-lstdc++ -------- | ||
▲ | sfpotter 5 days ago | parent [-] | |
It's a great feature, and D has a bunch of support for this kind of thing. But D and C++ have just enough differences to make extern(C++) not be automatic. It can take some pretty arcane metaprogramming to get things to work, and some things are impossible. It's also worth pointing out that D isn't trying to be fully compatible with C++. |