August 23, 2016
On Tuesday, 23 August 2016 at 22:15:33 UTC, John Colvin wrote:
> If you have no patience for any bugs and must have the best optimised code on windows, D isn't quite there yet. However, if you can stomach a little pain, the reward is pretty good.
>
> P.S. relying on the microsoft linker is not much different (once it's installed) to relying on ld on linux.



Interestingly I found that LDC is crashing when I compile my code from visual D but not from the command line. It looks like it's using the same options but it's hard to tell exactly. I'll investigate further tomorrow and give it another try.
August 24, 2016
On Tuesday, 23 August 2016 at 21:15:40 UTC, John Burton wrote:
> I've recently gone back to looking at D and like what I see.
> I've mostly been looking at it on Linux where it seems efficient and stable.
>
> [...]

A MingW version of GDC can be found here: http://botcode.net/gdc-5.2.0+2.066.1.7z
It seems to work most of the time.
> trace, and sometimes it just hangs. Occasionally if I move and rearrange the code it will manage to compile it. There are also worrying comments on the LDC web page about how "Most programs work just fine" and "Several unit tests still fail" and stuff about it relying on stuff from visual c++ in order to work that make me seriously doubt it's stability and correctness.
>
> [...]

August 24, 2016
On Tuesday, 23 August 2016 at 21:15:40 UTC, John Burton wrote:
> I'm like an honest opinion... Am I wasting my time trying to do this project in D on Windows? I'll continue to use and support the language but I don't want to fight a losing battle and end up having to move away anyway...
>
> Is there a stable LDC, or is there possibly something wrong with my install? Is LDC sufficiently working to use for "production"?

Dmd is very well-supported on Windows, but its optimizing backend is not as good as llvm.  Ldc's MSVC support has only been around for a year or two, so while it produces faster code, you may run into some bugs.  If you have to have speed, your best bet is to use ldc and report any issues you run into.

I don't think gcc supports Windows very well, so I doubt gdc can either.
August 24, 2016
> I managed to find and install LDC, and that mostly, somewhat works.
> 
> Except that half the time the compiler crashes with a stack trace, and sometimes it just hangs. Occasionally if I move and rearrange the code it will manage to compile it. There are also worrying comments on the LDC web page about how "Most programs work just fine" and "Several unit tests still fail" and stuff about it relying on stuff from visual c++ in order to work that make me seriously doubt it's stability and correctness.

The times when Windows wasn't a first class target for LDC are over. We've got Windows CI for a year now, so there should be no severe Windows-specific bugs (all unittests and the LDC-specific set of DMD tests work). What's still missing is proper debuginfos, and I'm unsure about DLL support.

As you didn't mention the LDC version you tried, I recommend using bleeding-edge master for Windows: https://github.com/ldc-developers/ldc/releases/tag/LDC-Win64-master

I've never experienced any hangs; compiler crashes may occur, but should be very rare. Be sure to let us know when you hit something at https://github.com/ldc-developers/ldc/issues - we can't fix stuff we don't know about!

> Interestingly I found that LDC is crashing when I compile my code from visual D but not from the command line.

Worth investigating.

> I'm like an honest opinion... Am I wasting my time trying to do this project in D on Windows? I'll continue to use and support the language but I don't want to fight a losing battle and end up having to move away anyway...

I've been working on LDC for a couple of years (focusing on Windows), mainly because I want to be able to replace C++ at work at some point. Instead of waiting for others to fix it, I realized one needs to get involved to push things forward. I still don't write any D code except for unittests and occasional DMD front-end mods, so I'd love to get some feedback on real-world usage of LDC on Windows.

On Tuesday, 23 August 2016 at 21:25:29 UTC, Cauterite wrote:
> Well, you're fighting a losing battle by trying to use GDC/LDC on Windows, since Windows is priority #2 for D, and GDC/LDC are still struggling with priority #1 (Linux).

@Cauterite: You obviously have no idea about LDC at least, so please stop making such noninformed claims.
August 24, 2016
On Wednesday, 24 August 2016 at 08:23:26 UTC, kink wrote:

>
> I've been working on LDC for a couple of years (focusing on Windows), mainly because I want to be able to replace C++ at work at some point. Instead of waiting for others to fix it, I realized one needs to get involved to push things forward. I still don't write any D code except for unittests and occasional DMD front-end mods, so I'd love to get some feedback on real-world usage of LDC on Windows.
>

Cool. I'll soon (try to) switch to LDC on Windows for release builds, since it seems to have improved a lot. I'll keep you updated.
August 24, 2016
On Tuesday, 23 August 2016 at 22:30:29 UTC, John Burton wrote:
> Interestingly I found that LDC is crashing when I compile my code from visual D but not from the command line.

I probably use LDC since it appeared and never seen it crash, but I compile from command line.
August 25, 2016
On 25/08/2016 12:54 AM, Kagamin wrote:
> On Tuesday, 23 August 2016 at 22:30:29 UTC, John Burton wrote:
>> Interestingly I found that LDC is crashing when I compile my code from
>> visual D but not from the command line.
>
> I probably use LDC since it appeared and never seen it crash, but I
> compile from command line.

A couple of releases ago it use to crash for me most of the time. Now though? I'm quite happy using it, fairly stable (only through CLI).
August 24, 2016
On Wednesday, 24 August 2016 at 08:23:26 UTC, kink wrote:
>
> I've been working on LDC for a couple of years (focusing on Windows), mainly because I want to be able to replace C++ at work at some point. Instead of waiting for others to fix it, I realized one needs to get involved to push things forward. I still don't write any D code except for unittests and occasional DMD front-end mods, so I'd love to get some feedback on real-world usage of LDC on Windows.


Since several versions the configuration on Windows became "plug'n play".

Using DUB I still use --combined because of a bug that may have been fixed already.

A minor problem is that on Windows users expect both x86 and x86_64 builds so one has to juggle with the 2 LDC PATH to release both. I've said this thrice already and it's quite minor really.

Honestly since 1.0.0-b2 it's pure bliss and I've come to trust it very much.
August 25, 2016
On Wednesday, 24 August 2016 at 21:13:45 UTC, Guillaume Piolat wrote:
> A minor problem is that on Windows users expect both x86 and x86_64 builds so one has to juggle with the 2 LDC PATH to release both. I've said this thrice already and it's quite minor really.

There's a multilib edition for the CI builds for the time being. Just make NOT to run it inside a 'VS Tools Command Prompt', so that LDC can set up the MSVC++ environment variables for 32/64 bit linking.

> Honestly since 1.0.0-b2 it's pure bliss and I've come to trust it very much.

Thanks, appreciated!
August 25, 2016
On Thursday, 25 August 2016 at 06:08:50 UTC, kinke wrote:
> On Wednesday, 24 August 2016 at 21:13:45 UTC, Guillaume Piolat wrote:
>> A minor problem is that on Windows users expect both x86 and x86_64 builds so one has to juggle with the 2 LDC PATH to release both. I've said this thrice already and it's quite minor really.
>
> There's a multilib edition for the CI builds for the time being. Just make NOT to run it inside a 'VS Tools Command Prompt', so that LDC can set up the MSVC++ environment variables for 32/64 bit linking.
>
>> Honestly since 1.0.0-b2 it's pure bliss and I've come to trust it very much.
>
> Thanks, appreciated!

Thanks everyone for the information here.

I think my best approach is to use visual D with DMD for most of my development work as it seems better supported and debugger works better etc.

And then make *frequent* builds from command line to test with LDC and use that for "production". It sounds from what I read here that it's stable enough to use for that :)

I'll try to find a small test case that crashes the compiler in visual D and check out what version I'm using etc, and submit a bug report if I am able.