Hacker News new | past | comments | ask | show | jobs | submit login

Ain't it great to have a choice? Each has their strengths and weaknesses, and have different feels. Just install all three, and see which one suits your style best.



This is literally what stopped me from learning D a few years ago. I started reading about it, got intrigued, did some tutorial-style stuff, decided to try it on a real project, and then realize that meant having to figure out which toolchain or choice of standard lib to use, and just gave up and used c++ as usual.

If I was already familiar with the tradeoffs, or if I was very motived to learn D, I'm sure this wouldn't have been a big obstacle. There were plenty of resources explaining the difference and I'm sure there are more now. I'm just saying, anecdotally, that this was the roadblock for me.


Interesting, I saw it the other way at least there is no single supplier...The best way I found to think of it was (though your mileage may vary with the analogy):

DMD - gave latest features - its the shiny concept super car reference that shows whats coming next..

LDC - is the production sports car -integrates with rest of LLVM - and occasionally surprises with innovative features like Nicholas Wilson's brilliant D-compute.

GCC - its the production workhorse, fits all pipelines, goes where you need it and does it with style - its the muscle car of D world.

You pick the one that meets what you need/want.

Ian Buclaw has really done a superb job piloting this into GCC and hopefully GCC support might get you to look at D again :-).


It's not so much different compilers, I don't remember the specifics, but at the time the impression I got was that each one had a very different standard library, so it would be hard to move from one to another. Maybe that's not the case anymore, or maybe I was mistaken.

In any case, thats a good analogy, and I'll try to find an excuse to take another look at D. Having gcc support does sound like it would make things easier. Thanks.


The different standard libraries was a very serious pain point that was deadly to D's arc, but it was long ago and is no longer the case.


Imagine you don't already know this though, to really make an informed choice you have to put in all the research just to know the answer to a very simple decision.


yup, like it or not highly opinionated languages like Golang actually make beginners feel more comfortable as they're not confronted with choices they don't know they answers to at every turn


> realize that meant having to figure out which toolchain or choice of standard lib to use, and just gave up and used c++ as usual

Once upon a time C++ was in much the same state.


It still is, and C as well.

Trying to write portable C99, C11, C++11, C++14, C++17 code can be an interesting experience depending on which compilers are available.


Big nope. Biggest nope.

At the time I was super enthusiastic to try out (many years ago at this point), it wasn't open source so I decided to wait it out.

Later, I decided to try it out again, but I had to choose between Phobos and Tango. I didn't have time to evaluate them so I bought a book on Tango. I shelved it because it seemed like a lot of stuff was still changing.

When I tried again a couple of years later I wasn't sure whether to use DMD, GDC, or LDC. I didn't have the time to evaluate the compiler implementations, I just wanted to poke at it and try it out, and wanted to look at a bunch of examples before I jumped in. Three compilers made it a pain in the butt so I put it on the backburner and forgot to ever come back.

At this point D had asked too much of me to figure out how I wanted to use it, three times over, and I wasn't about to commit myself to researching the implementations instead of just hacking so I abandoned D despite initially falling in love with it. By that point, other good native C++ alternatives had matured - Go, Rust, and Swift – for different use cases.

After giving it three shots to give me a simple and consistent development experience I'll probably never try D again.

Meanwhile, Rust has one compiler and I have multiple choices of IDEs which all support the toolchain - I just set it and go and it tends to do just what I want because all that common surface area in the Rust community gets improved for everyone.

D is a great language hampered by a depressingly frustrating developer experience, and as such until that changes it is deeply hurting its own competitiveness with everyone who isn't committed to using it and making it work for them right off the bat (many many people).

I also know one FAANG company that invested in D is seeing a very noticeable shift towards Rust instead.


As category theory teaches us, there is a duality to a choice. If you are constructing value of a sum type you can choose any variant, but the one who receives it should be able to handle any possible variant. If you are using a library you can choose any compiler, but author of that library should ensure that it works with all compilers. If someone has a choice, then in some other place there is more complexity or work to be able to handle that choice.


The implementations all share the same front end, which serves to minimize language differences between them.


Indeed. But a new version of DMD gets released with every update of the front-end, those then get slowly merged into LDC, and even more slowly into GDC. Last time I checked a lot of my code and it's dependencies don't compile on anything except DMD.


>Ain't it great to have a choice?

Not if the choice leads to duplication of effort, smaller community, feuds and conflicts, decision fatigue, and so on.


Now for the benefits:

* Better feature stability, * Robust and well-defined standards, * improved security, * better debugging options, * and most importantly competitive pressure.

Just look at how LLVM pressured GCC into shape. I'm primarily a GCC user, but I'm very very grateful for LLVM's existence. Also multiple equally competent compilers disincentivise them from going rouge (e.g. .net telemetry).

Weighing the pros against the cons, I'd have to stand with GP in saying that choice is good.


> Ain't it great to have a choice?

Heh, yeah, let's go ask the JS frontend community about this one... oh dear.


But they use the same frontend, so most of that is moot.


>Ain't it great to have plenty of water to drink?

Not if it leads to water intoxication.


Only water intoxication is easy to avoid and 99.999% of the population manages even with tons of water available.

Whereas the things I mentioned are endemic in many communities with such choices between different implementations.

So not an apt counter-argument. An analogy doesn't just need to be somewhat similar to the situation -- it needs to have similar ups and downs too.


I remember that - _many_ years ago, ten maybe? - when I tried to use D for OS development, I was forced to use GCC because it was the only one who supported custom linker scripts IIRC. Nice to see that all the projects are still doing well!


I recently tried to use d for osdev, and was able to use all 3 compilers.


> Ain't it great to have a choice?

Not if it means that every choice is sub-par




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: