Why is D unpopular?
harakim
harakim at gmail.com
Mon Nov 8 05:13:27 UTC 2021
On Sunday, 7 November 2021 at 06:36:48 UTC, arco wrote:
> Many people have forgotten it now but at one point, Rust had
> classes with inheritance as well as a GC. It was concluded that
> those features didn't belong in a systems language and were
> removed. This is probably Rust's greatest strength over D: its
> consistency, the follow through to ensure that features that
> are declared stable are really rock solid and make sense within
> the language's general philosophy.
I agree.
Go still doesn't even have generics in stable and
> it hasn't slowed down its adoption.
I have noticed Go adoption has slowed down a lot. I wanted to
love Go... but it was too slow to get anything done besides a
hello world type program. Since you said this, I decided to
double check and the tiobe index seems to agree, as does google
trends. I think Go's decline in popularity is an example of all
the problems D doesn't have. It's mild success includes all the
things D lacks: standard tools, corporate backing, tutorials,
etc..
> Regarding Python, its biggest advantage (other than its
> outstanding ecosystem) is that it's a dynamic language.
> Prototyping, testing, customising etc will always be easier and
> more flexible in Python than in any compiled language. Plus its
> conscious focus on a simple syntax makes it in my opinion the
> modern day heir to the BASIC of the 80s in terms of universal
> applicability and a kind of immediacy.
I agree that that is the appeal of python. It's dynamic but also
has languages. What other languages is like that? Javascript is
kind of like that, but it's such a horrible language anyway.
> D's general approach has been to always try to have its cake
> and eat it too. It wants a GC but at the same time wants to
> pretend that it doesn't need a GC, it wants to support OOP
> (with inheritance etc) and at the same time tries to downplay
> it, etc. Ultimately in each of these cases it fails to provide
> the advantages of either of the valid choices while retaining
> the disadvantages of both.
I have experienced this phenomenon a lot in my career, but I
think D is pretty good at having more than one way of doing
things. I like not having to have classes, but I like having them
available. The way I feel about frameworks is how I feel about
languages like python. You have to do it their way even though
you know a better way. With D, I do feel like . This is one of
it's strongest advantages. If I want to do string handling in a
pointer-based way, I can! If I want to use normal methods, the
language supports that. Arrays are a great example. You get most
of, if not all of, the power of a list in another language, but
you get all the power of arrays. I'd like to see an example that
shows you get the worst of both! I have relied on that heavily
this weekend.
> This is a hard lesson that D desperately doesn't want to learn.
> By trying to appease everyone it ultimately doesn't win for
> anyone in particular.
Although I agree with pretty much everything you have written, I
think that is one of D's strengths. That was reiterated this
weekend. I got a call for a job and they said the next interview
would be on codesignal.com. I did about 100 practice problems and
I found myself reaching for D a lot. There were some problems
where I pretty much had to go to C# if I wanted to do it in 5
minutes (most things Linq related or string related. I don't know
what D's equivalents are.)
I don't think D needs to stick to one way to do everything. I
think Python is popular almost in spite of that because it's easy
to start and it has good libraries. You get that constant success
metric where you write something and it works right away and you
tweak it and get little wins along the way. D is similar except
for some safety stuff that I have ideas about (immutable, const,
etc.)
There are two effects I see where being opinionated is VERY
helpful - maybe essential - to a language.
1. Documentation and tutorials
Tutorials need to be opinionated. People need to see ONE way to
do things when they learn. Once they understand, they can take
advantage of all the different ways, but they need to see a path
to success.
2. Whatever you expect people to do with the language, it needs
to be designed so there is at LEAST one way to do the above
things that is elegant. For example, web servers usually allow
some kind of annotation-based routing system. If you use Jetty
and you do your own routing, that is fairly confusing and
time-consuming. That is something where the annotation-based
method is a simple solution and allows you to not have to discuss
much about routing and that part of the framework to a new user.
It allows you to streamline. However, for Jetty (and technically
others), you don't HAVE to do it that way. It's just the default
way. Someone once said something like allow endless configuration
but provide sensible defaults. That's what the D language is good
at.
I would like to read your response to this.
Then they can take advantage of the rest. It needs to provide a
vision when teaching. I don't think the language needs to be
opinionated, but the tutorials need to be. Also, they need to
have a succe
More information about the Digitalmars-d
mailing list