What is D?

Mike Franklin slavo5150 at yahoo.com
Sun Apr 7 13:05:14 UTC 2019


On Sunday, 7 April 2019 at 11:39:01 UTC, Abdulhaq wrote:
> What is D?

I think D started not as a better C++, but as a better Java.  I 
think Walter saw the appeal of Java and wanted to explore making 
it compile to native binaries.  There is evidence of this with 
things like `super`, single inheritance with multiple interface 
implementation, the garbage collector, etc.  When D started it 
didn't have templates, and I even heard Walter forbade templates 
at first.

I also think D is more evolution than intelligent design.  It has 
evolved so much over the years, moving away from a "native java" 
to to more of a "better C++".  It think that has contributed much 
to its oddities, warts, and technical debt.

A few years ago D's slogan was changed to "Fast this, fast that, 
yada yada".  I honestly don't know what it is because I read it 
once, immediately hated it, and forgot it.  Prior to that change, 
D's slogan was "Modeling power, modern convenience, and native 
efficiency" See https://www.youtube.com/watch?v=Kn88228KSpQ for a 
presentation by Walter elaborating on this. <-- THIS IS D!

I think over the past few years it has become apparent that D has 
also become a case study in design by introspection:  See 
https://www.youtube.com/watch?v=Kn88228KSpQ for a presentation by 
Andrei elaborating on this.

To a lesser degree, I'd say D also has safety, though I hope that 
some day it will be able to compete with the likes of Rust in 
that department.  @safe by default, please!

Contrasting D with a few languages that I have some experience 
with:

I don't like C.  It's a simple language, but it doesn't have 
modeling power or modern convenience.

I don't like C++.  It has modeling power, but the models quickly 
become monstrosities.  It also lacks modern convenience; e.g. 
having to forward declare things is primitive.

I don't like Rust. It lacks modeling power.  It achieves much its 
safety and robustness by restricting the user.  D, by contrast, 
empowers the user.

I don't like C#. It lacks modeling power (no metaprogramming 
capabilities).  Composition is not DRY.  It lacks native 
efficiency.  I'll probably never be able to use C# to program an 
ARM Cortex-M microcontroller with only 16KB of flash memory.  It 
also lacks portability, though .Net core is helping to improve 
that situation.

I want to be able to use one programming language for everything 
from cloud services to microcontrollers the size of a grain of 
rice.

I want to be able to model my ideas the way I envision them; I 
don't want to have to distort my vision to make it fit my 
programming language's limitations.

I want to have some of the modern conveniences of languages like 
C#, but without all of the metaprogramming, platform and problem 
domain restrictions and limitations.

I don't want to have to repeat myself in header, source files, 
and forward declarations, or anywhere else for that matter.

I want my programming language to help me get things right (e.g. 
with regard to memory safety).

D's the only language I've found that has the potential for all 
of that.  It's not there yet, but it can become that.

There are plenty of things I don't like about D, but of all the 
languages I've used D seems to have the most potential.  I do not 
think D is managed well, and I think that is holding it back.  I 
fear that in 5 years, D will be exactly where it is now; an 
obscure language with a cult following.  However, Andrei's recent 
post (https://forum.dlang.org/post/q7j3s0$15n7$1@digitalmars.com) 
"We've been worrying too much about changing things" has 
reignited my hope for D.  D's a good language, but it has to 
clean up its warts and shed some technical debt if it wants to 
compete in the big leagues.

I'm giving D another try hoping Walter and Andrei are willing to 
embrace a little change.

Mike







More information about the Digitalmars-d mailing list