On Thursday, 21 August 2014 at 20:43:53 UTC, Jonathan M Davis wrote:
On Thursday, 21 August 2014 at 20:33:56 UTC, Walter Bright wrote:
On 8/21/2014 11:54 AM, Jonathan M Davis wrote:
LOL. Yeah, well, it would be ni going to support C+ce if we could get an actual list of the C++ features that D currently supports somewhere (and how to use them if it's not obvious). You've been doing so much great work on that that I have no clue what the current state of things is. For instance, this is the first I've heard of anything about template support; I'd thought that we were never going to support templates. Is it just for name mangling or for actually
compiling them?

The thing is, while the code was there, there wasn't a single test case for it in the test suite. Furthermore, at least for Elf, there was no support for the special mangling done for ::std:: stuff.

The thing is, modern C++ practice makes heavy use of std types. Having an interface to C++ code is fairly unusable unless D can also interface to std::string, std::vector, and a few others.

The first step is to support the mangling of them. Then, try to construct a "workalike" on the D side that follows D rules, and yet is able to seamlessly interact with the corresponding C++ code.

We'll see how far we can get with that, and then evaluate what to do next.

There are no plans for actually compiling C++ code with a D compiler. The plan is for support like we do for C - have a .d "header" file for it.

Well, I wouldn't have expected us to be compiling C++ per se, but previously, it seemed like the party line was that we wouldn't be supporting C++ templates at all because of how hard they were and because we don't want a C++ compiler in the D compiler. I'm certainly all for anything we can do for C++ compatability without going off the deep end. I just don't hear much about what we're actually doing right now. So, I really have no idea what the current status of that is. With what was said at dconf and comments like these, it seems like we're making huge progress in comparison to where we were, and as far as I can tell, about the only way to hear about it is to either pay a lot of attention to dmd pulls or to see an occasonal comment from Daniel talking about it or from someone who's paying close attention to what he's up to. So, at some point in the near future, it would be nice if there were somewhere that actually said what D can actually do with C++ now, even if that doesn't include everything that's going to be coming or if much of it is marked as experimental and relatively untested.

- Jonathan M Davis

It would be nice to have a page to link to when questions come up on Reddit about compatibility with C++. That page should also have information about avoiding the garbage collector and the status of GC removal from the standard library.

Reply via email to