Why is D unpopular?

Joshua jtacoma at pm.me
Tue May 10 23:08:18 UTC 2022


On Tuesday, 10 May 2022 at 07:00:03 UTC, Ola Fosheim Grøstad 
wrote:
> On Tuesday, 10 May 2022 at 04:16:32 UTC, Joshua wrote:
>> Worse, these build systems’ support for mixing languages is 
>> mostly superficial. Rust’s Cargo, for example, or Go’s Get, 
>> are neither optional nor easy to integrate into other build 
>> systems.
>
> I am a bit puzzled by your experience. It is not uncommon to 
> use "vendoring" of libraries in Go, so I am not quite sure why 
> you feel bound to something specific.

Right! Ok, what I mean is that I can easily combine D, C, and C++ 
in the same binary build target because none of these languages 
are tied to a build system that supports only one language. As an 
example, if I'm willing write a bit of C-interop boilerplate and 
make some decisions about garbage collection, a 
[meson.build](https://mesonbuild.com/) like the following just 
_works_:

```
project('myapp', ['d', 'c', 'cpp'])

executable('myapp', ['lib.d', 'lib.c', 'lib.c++'])
```

I [can't](https://mesonbuild.com/Rust.html) throw Rust into the 
same build target, but even if I could I'd still have to deal 
with the fact that doing anything interesting in Rust (or Go) 
requires using Cargo (or `go get`) to download 10× more 
dependencies than I asked for, which is 10× more long-term 
instability than I intended to accept. I don't mean to be 
excessively critical: they're wonderful languages, and having the 
option to reuse work from such large ecosystems is _truly 
amazing_. AFAIK, nothing remotely similar existed for compiled 
languages more than 10 or 15 years ago. I'm just not a fan of the 
trade-off: it's like, _"Everything you can see in this vast 
ecosystem is free to reuse, all you have to do is use this here 
build system which supports the only programming language you'll 
ever need. Isn't that great? Now go forth and make a name for 
yourself by rewriting useful libraries from other ~~other~~ 
inferior languages into our new paradise!"_ It's exciting and fun 
and so much work and at the end you get... a silo. Not so with D 
(or at least not as far as I know yet! ☺)


More information about the Digitalmars-d mailing list