August 21, 2014
On Wednesday, 20 August 2014 at 16:25:04 UTC, disapointed user wrote:
> too bad that i wasted my time for such a long time. i post a link to that thread with your answer to everywhere i can, so that others won't waste their time too.
>
> anyway good luck in the future for you linux guys.

Well, people have different perspectives :) see http://forum.dlang.org/post/lrsnjovurigezboqxnba@forum.dlang.org
August 21, 2014
On 21/08/14 12:10, Daniel Murphy wrote:

> Support for C++ templates was in the last release, and the new pull
> request is only for special mangling of some stl declarations.

You see, I get confused of all the syntax changes ;)

-- 
/Jacob Carlborg
August 21, 2014
"Jacob Carlborg"  wrote in message news:lt50m0$20f0$1@digitalmars.com... 

> > Support for C++ templates was in the last release, and the new pull
> > request is only for special mangling of some stl declarations.
> 
> You see, I get confused of all the syntax changes ;)

Don't worry, so did Walter.
August 21, 2014
On Wednesday, 20 August 2014 at 17:18:08 UTC, Andrei Alexandrescu wrote:
>
> What is it that we could help with? -- Andrei


Windows users basically need something like Lazarus but with D language.
http://www.lazarus.freepascal.org/
August 21, 2014
On Thursday, 21 August 2014 at 15:20:49 UTC, Daniel Murphy wrote:
> "Jacob Carlborg"  wrote in message news:lt50m0$20f0$1@digitalmars.com...
>
>> > Support for C++ templates was in the last release, and the new pull
>> > request is only for special mangling of some stl declarations.
>> 
>> You see, I get confused of all the syntax changes ;)
>
> Don't worry, so did Walter.

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?

- Jonathan M Davis
August 21, 2014
On Tuesday, 19 August 2014 at 08:14:41 UTC, novice2 wrote:
>>http://dlang.org/changelog.html
>>Version D 2.066 August 18, 2014
>>...
>>Phobos enhancements
>> 1.Bugzilla 3780: getopt improvements by Igor Lesik
>
> Sorry, i can't find this improvements nor in getopt.d nor in http://dlang.org/phobos/std_getopt.html.
>
> Is this announce prematurely, and that this changes will be seen in 2.067 ?

I suspect that the changelog was done by dates rather than based on what was actually merged. Someone else was commenting that some stuff was in there that's going to be in 2.067 and not 2.066, and 2.066 took long enough after it was branched, that it would be easy to accidentally list 2.067 stuff for 2.066 if you were looking at merge dates rather than what actually went on the 2.066 branch.

- Jonathan M Davis
August 21, 2014
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.

August 21, 2014
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
August 21, 2014
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.
August 22, 2014
"Jonathan M Davis"  wrote in message news:fxdqpmfcbskvtcafzfcp@forum.dlang.org...

> 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?

Templates are sort-of supported.  The main motivation was to allow dmd's Array<T> type to be used in function signatures.  This is nice, because it only requires correct name mangling, you don't need to worry about instantiation.

Being able to call templated free functions and call methods on templated types will require each referenced template to be explicitly instantiated on the C++ side.  I don't think it's realistic for D to do this automatically, although it is possible to do things like generate a non-templated forwarding wrapper function for each instantiation.

In DDMD, this is worked around by array.d containing a functionally-equivalent translation of array.h.  The D code all ends up calling the D version, and the two must be kept exactly in sync.  This approach is probably feasible for accessing stl types and other common, rarely changing C++ templates.

There are two reason it's not better documented:
1. I hate writing documentation.  I really really hate it.
2. These features are rather difficult to use, and I don't want people to think they can just plug-and-play.  I've spent a lot of time fighting compiler alignment bugs, which are their own special kind of hell.  Many of those issues have been resolved now, but only in the areas that ddmd actually exercises.