Using D

Chris via Digitalmars-d digitalmars-d at puremagic.com
Mon Jul 14 03:13:42 PDT 2014


On Saturday, 12 July 2014 at 10:27:12 UTC, Russel Winder via 
Digitalmars-d wrote:
> On Fri, 2014-07-11 at 16:54 +0000, Chris via Digitalmars-d 
> wrote:
> […]
>> I remember Java used to be "theeee" best thing ever. After 
>> years of using it, however, I found out how restricted the 
>> language was / is. Still, it's been a success, because people 
>> believed all the propaganda. What matters to me is not so much 
>> the odd fancy feature, it's how well the language performs in 
>> general purpose programming. Go was designed for servers and 
>> thus will always have one up on D or any other language at 
>> that matter. But could I use Go for what I have used D? Not so 
>> sure about that. Also, like Java Go is a closed thing. D 
>> isn't. Once I read about D that it shows what can be done 
>> "once you take a language out of the hands of a committee". 
>> Go, like Java, will finally end up in a cul de sac and will 
>> have a hard time trying to get out of it. Not because the 
>> language is inherently bad, because it's in the hand of a 
>> committee. Ideology kills a language. But it doesn't matter, 
>> because people will use Go or whatever anyway, will _have_ to 
>> use it.
>
> People believed the FORTRAN propaganda, the COBOL propaganda, 
> the Pascal
> propaganda. I think we ought to distinguish good marketing from 
> hype.
> Java had good marketing, was in the right place at the right 
> time, and
> had a huge amount of hype as well.
>
> If Go is better for server things than D then might as well 
> stop trying
> to use D at all.
>
> Go was actually designed as a better C with CSP for concurrency 
> and
> parallelism.
>
> Go, D, Rust, C++, C, Haskell,… are all just programming 
> languages that
> create native code executable. Thus they are all in the same 
> category
> regarding potential usage. Everything else is about whether the
> programmer likes and uses well, the language.
>
> If Go and Java are closed languages, so is D. All three have 
> open source
> repositories and people can submit changes via pull requests. 
> All three
> have committees comprising the people who have commit rights to 
> the
> mainline and they are the only people who can actually change 
> the
> language.

But D is much more open to discussion and features are 
implemented faster, as far as I see. If I think about Java, that 
it took them ages to implement useful features like enumerations. 
Go ruled out templates, if I remember correctly. It's this kind 
of ideological / dictatorial attitude I don't like. Of course, 
Walter has the veto of death, it's his child after all. But there 
is far more flexibility. In the D community people listen to each 
other and trust each other's judgements and user experiences (or 
we wisely shut up, if they have no expertise on a certain topic).

> I think I have to repeat the point about irony here regarding
> ideology :-)
>
>> What I'm taking issue with is that everybody focuses on the 
>> flaws of D (every language has flaws), which often gives the 
>> impression that it's an unfinished, stay-away business. It's 
>> not. D can be used, and I've used it, for production code. 
>> It's more mature than D or Rust and it is superior to other 
>> languages like Java (no OO-ideology for example). Mind you, D 
>> is a hindsight language, which makes it wiser. Does it have 
>> flaws? Yes. I come across them sometimes. Is there a language 
>> without flaws? If there is, tell me about it. Talking about 
>> hindsight, I've tried many different languages, I like D 
>> because of what it has to offer for general purpose 
>> programming, it compiles natively, interfaces with C at no 
>> cost at all, it has strong modelling power, features that 
>> users require are added. I may sound like a zealot (see 
>> "irony"), but I'm not. I'm very pragmatic, D is a good tool 
>> and, being community driven, there is a real chance of making 
>> it a fantastic tool. Individual features are not everything.
>
> Go folk have exactly the same view and argument regarding Go. 
> Java folk
> have exactly the same view and argument regarding Java – well 
> except for
> the compiles to native code bit, obviously. ;-)
>
> In the end it is about community rather than the programming 
> language
> per se. Java created a huge community that was evangelical. Go 
> has
> rapidly created an active community that is evangelical. Python 
> has
> rapidly created a large evangelical community. D has slowly 
> created a
> small community that hasn't as yet created the outward looking
> evangelical aspect. Where are the user groups having local 
> meetings is
> my main metric. Java definitely, Go definitely, C++ sort of, D 
> no. This
> is the real problem for D I feel. Without local user groups 
> meeting up
> you don't get exposure and you don't get traction in the market.
>
[snip]

You are right of course, but that was not my point at all. My 
point was that we have to stop the constant D-bashing. One flaw 
(or perceived flaw) is blown out of proportion and used to 
discard the language as useless, which it is not. What H.S. Teoh 
described is true, you can start with script like stuff in D and 
it scales later. I've been doing the same thing for a while now. 
I no longer use Python or the like, I just use D, and if it's 
just for a regex filter.

There are three things involved here, one is that people opposed 
to D are willing to put up with whatever flaws in other 
languages, but have no mercy when they detect a flaw in D, which 
leads us to point two: I suppose people don't "trust" D, because 
it has no big company behind it (so it cannot be good, it's not 
"authoritative", in other words D doesn't wear suit an tie). 
Third, we don't emphasize the good things about D enough (see H. 
S. Teoh's list). I can imagine that people are (ironically 
enough!) put off by D, because they think it is too difficult, 
too nerdy (cf. templates, ranges). It's true, it takes time to 
grasp some of D's more advanced features. But D can be used in a 
simple way for simple things (cf. script like programs). If 
someone is thinking about writing a program that does some number 
crunching in C (say for signal processing), why not use D instead 
of C or Python (God forbid!)? It can later be extended or 
improved. You don't need to be a rocket scientist to use D, it 
offers the same ease of use as Python. I think people are 
sometimes a bit scared to leave the comfort and security of the 
well-trodden path that languages like Python and Java seem to 
offer.

I think we need to address these issues, because they are of a 
psychological nature and not really language issues. I'm sure 
that if we fixed GC and had the best implementation ever, people 
would find something else to complain about "D doesn't have blah, 
I don't like it!"

That's basically what my post was all about.


More information about the Digitalmars-d mailing list