Where will D sit in the web service space?

Joakim via Digitalmars-d digitalmars-d at puremagic.com
Thu Jul 23 01:16:10 PDT 2015


On Thursday, 23 July 2015 at 07:05:16 UTC, Ola Fosheim Grøstad 
wrote:
> On Wednesday, 22 July 2015 at 21:38:14 UTC, Joakim wrote:
>> "[W]e've loved D so much that we're in the middle of a full 
>> rewrite from C++11 to D. The productivity boost is absolutely 
>> worth it."
>> http://www.reddit.com/r/programming/comments/3cg1r0/lessons_learned_writing_a_filesystem_in_d/csvyxn8
>
> But it doesn't say why. Did they evaluate Rust too?

It's a reddit comment, not a blog post, understandable that they 
didn't get into all that.

> Granted, everyone can find several very good reasons to dislike 
> C++, so any reasonable language that can replace it can be said 
> to have an advantage if that dislike is present on a C++ team...

Sounds like they love D more than simply disliking C++.

> But as far as C/C++ replacement languages go, there are several 
> focusing on being more suitable than C++ for specific niches: 
> Rust, Go, Chapel, Vala…
>
> The more generic ones like D, Loci, etc appears to be less 
> used. I assume the lack of a specific edge over C++ matters.

Perhaps, but are Chapel and Vala more used than D?  I wouldn't 
think so.

>> And as I've said before, focusing on a domain means you 
>> optimize for it, which inevitably means you become less 
>> general.
>
> Not really, you just focus your effort at making it work really 
> well for a particular domain. Like C++ with extensions for a 
> specific purpose.

Resources are limited, so focusing on that domain usually means 
the other domains suffer.  Worse, language design choices made to 
optimize for that domain can hamstring any attempt to turn the 
language more general-purpose later.

>> Php has proven to be highly optimized for the web programming 
>> domain, in that it is highly successful at being chosen for 
>> many web projects, but almost nobody would want to use it for 
>> anything else, for a variety of reasons, but mainly that the 
>> qualities that make it successful on the web hurt it in other 
>> domains.
>
> Well, Php is quite horrible for web programming too, but they 
> gained traction for many of the same reasons perl did:
>
> - It was easy to get started with when you needed 10-50 lines 
> of scripting in 500 lines of HTML.
>
> - Provided library interfaces that was similar to 
> Unix/C-libraries (really awful, but easy to get started)
>
> - Early adopters, there was no real competition outside perl
>
> - It got "bundled" with web-servers one way or the other.

Right, all but the third are choices they took to do well in that 
niche, that don't translate to, say, writing a good native mobile 
app.  If you want to be general-purpose, you have to put more 
thought into staying out of the trap of trying to be as simple as 
possible for scripting, because that will hurt you for heavier 
tasks.

>> languages.  Even if the pendulum doesn't swing all the way 
>> back as far as we think it will for general-purpose native 
>> languages, that's a very large niche, one with few choices- C, 
>> C++, D, Rust, Go (the first two legacy)- and well worth 
>> competing in.
>
> But I think Rust and Go are focusing on specific domains. I 
> think people pick languages now looking for specific 
> characteristics that match their domain. I think the overlap 
> between Rust and Go is rather small.

Even better for D if Rust and Go are ceding the general-purpose 
language niche, :) I only mentioned those two because they're the 
native languages with the most hype right now and are somewhat 
general-purpose.  But Rust is supposedly aiming for the niche of 
large codebases written in a native language, such as a browser 
engine, and the ownership system they use to enable that turns 
off those not in that niche for being too complicated.  Go aims 
for the network servers niche, but that means those who want 
generics are never going to consider it.

Do you not see that there's a niche for a general-purpose 
programming language, in that it could theoretically be applied 
to everything from writing operating systems to webapps to 
scripts (even if it will rarely be used for the later two), one 
that C and C++ currently dominate?  It may be hard to knock them 
off, particularly as they're not standing still, but that's a 
much larger niche than the small domains you list.

>> roaring past D.  If your only point is that it's done better 
>> than it has a right to because it has a very specific strength,
>
> I'd say that Erlang captured a market despite shortcoming 
> because it was the only easy-way-out. And you probably could 
> say that about PhP too.

Yes, they both captured smaller markets and stopped there, unable 
to go further.  D is aiming for a bigger market.


More information about the Digitalmars-d mailing list