D vs Rust
Laeeth Isharc via Digitalmars-d
digitalmars-d at puremagic.com
Sun Jan 31 07:44:37 PST 2016
Guillaume Piolat
"- D is a large language, not sure how much relatively to Rust.
I've heard Rust is complicated too."
and yet, it's easy to get started if you know C. one can be
quite quickly productive without having any experience of
template metaprogramming, CTFE, and the like, and gradually
absorb language features as you go. Phobos is pretty readable,
on the whole. I agree with bearophile about GC making it easier
in the beginning.
bearophile:
"I am sometimes able to write working D code almost as quickly as
Python code"
Yes, indeed - that's my experience too. I wonder what we could
do to make this most of the time, if not almost always, and for
less experienced programmers than you. It wouldn't be surprising
to find that the things that tend to get in the way fall in
certain common categories. Some people have applied machine
learning to compilers to study this - that's probably beyond our
resources for now, but the idea makes sense. Adam's and others'
work on error messages might be part of the answer.
Thank you for the colour on OcaML. What could be done to improve
Algebraic and pattern matching? The talk at the London dmeetup
was quite interesting, but I had the sense that was fairly
experimental at this stage.
"There are several kinds of code that D allows you to write quite
better than Rust (generic application code, script-like code,
explorative scientific numerical code (like ndslice),
medium-integrity code, metaprogramming, compile-time
computations, template-level computations and specializations,
higher order template magic, and so on. "
Should we make more of a feature of this in the intro page.
Tutorials per category showing the value? And should the Rosetta
stone examples (many of which you wrote, as I understand it) be
more prominently featured? Maybe even in the code samples on the
front page too.
"In Ada you can be productive if you use it for the purposes it
was invented for, but most times you don't write that kind of
code."
Thank you - yes that's what I figured, and it probably isn't for
me. But I wanted to see if I was missing something.
" I like languages that avoid me most common bugs,"
I wonder what the most common bugs and traps are in D. P0nce's D
idioms allude to some of them, but that isn't the focus of what
he writes.
"I think D should relax and keep improving its strengths (like
C++ interoperability), fix some of its holes (safety, GC-less
programming, fixing its contract-driven programming experience,
etc), improve its medium-integrity coding, and keep going on as
usual, slowly getting better. The Rust and D niches are
sufficiently different, there's minimal overlapping in their
purposes and niches."
Yes - I completely agree. As Peter Thiel says, competition is
for losers. Much better to have a monopoly that you have earned
(and have to keep earning). I agree with Knuth that language
reflects thought and people intrinsically think differently (this
also being shaped by the domain) - he welcomed the prospect of an
expansion in the number and kinds of language available.
It's funny how the most negative critics in this forum and who
make diffuse statements about how D has lost the race often don't
seem to contribute much code to making things better. Contrast
with Manu, for example, who whilst spirited is actually through
actually using the language and reporting concrete difficulties
is directly driving the completion of some features.
Walter - sorry about that. I need to get someone to help on that
front as I have so little time. Should work now.
Laeeth
More information about the Digitalmars-d
mailing list