article comparing Rust and Zig, many points relevant to D
tsbockman
thomas.bockman at gmail.com
Wed Mar 10 00:14:18 UTC 2021
On Tuesday, 9 March 2021 at 21:06:46 UTC, Imperatorn wrote:
> Great summary! I don't understand why D isn't used more.
D is my personal language of choice, but it is no mystery to me
why it's been so slow to catch on. People always complain about
the same (mostly valid) things when asked why they aren't using D
(ascending order of importance):
4) Various out-dated criticisms like "the D compiler isn't open
source": These complaints are invalid; catching people up on the
history of the D project is all that is necessary to deal with
them.
3) Small ecosystem: This is valid, but somewhat unfair given that
D's lack of popularity is what keeps the ecosystem small. This
concern is also mitigated, but not eliminated, by D's excellent
interop with C (also Objective-C, Python, and maybe Java?).
Getting C++ interop working more fully would help a lot, too, but
that's a *very* hard problem.
2) Unsatisfying heap memory management options: D offers an easy
to use but inefficient GC, and C-style unsafe manual memory
management.
However, what many of the people who would even *consider*
switching to D really want is reference counting and borrowing
(like C++, Rust, Swift, etc.), with as much compiler automation,
optimization, and verification as possible. The D project has
been pursuing this goal for years through improved RAII, @nogc,
scope, DIP 1000, @live, etc. But, as of today, this subsystem
just isn't good enough to replace the GC.
No matter how much anyone on the forums claims that the current
heap memory management story is good enough, it won't change the
fact that many people who really do find D otherwise attractive
are turned away by this limitation. Most of the people who only
want GC are off using C#/Kotlin/Java/etc, and are satisfied with
them.
1) Buggy/incomplete/absent tooling: This is the big one. I
frequently encounter serious compiler bugs, the GDB debugger
crashes or fails to properly inspect and step through my programs
more often than not, and the D plugin for my IDE draws red
squiggles and yellow highlighting all over my correct, valid,
working code.
I'm sure my experience in this regard is worse than most, since I
make heavy use of various unpopular, incomplete, and new
features. But, some of the problems I find and report are in
really basic things, too.
All of the above issues have improved a lot in the years that I
have been using D, and I think these improvements are reflected
in D's increasing adoption. I am very thankful for the hard work
of all those people and institutions who have contributed to D's
increasing quality. But, there is still a *long* way to go to
catch up to the polished "it just works" experience of something
like Java.
> Maybe it's *too* flexible for some people? 🤔
There are some people who aren't interested in a complex,
multi-paradigm language like D. There are many others who *are*
interested, but they're stuck with C++ or have switched to Rust
because of the issues with D that I listed above.
More information about the Digitalmars-d
mailing list