Skip to content
Back to the collection

Origins of the D programming language

Walter Bright, Andrei Alexandrescu, Michael Parker

2020 · Proceedings of the ACM on Programming Languages

Read the paper
HN score
0
Mentions
9
Readers
3
Months
7
What’s in a score?

From the abstract

As its name suggests, the initial motivation for the D programming language was to improve on C and C++ while keeping their spirit. The D language was to preserve those languages' efficiency, low-level access, and Algol-style syntax. The areas D set out to improve focused initially on rapid development, convenience, and simplifying the syntax without hampering expressiveness. The genesis of D has its peculiarities, as is the case with many other languages. Walter Bright, D's creator, is a mechanical engineer by education who started out working for Boeing designing gearboxes for the 757. He was programming games on the side, and in trying to make his game Empire run faster, became interested in compilers. Despite having no experience, Bright set out in 1982 to implement a compiler that produced better code than those on the market at the time. This interest materialized into a C compiler, followed by compilers for C++, Java, and JavaScript. Best known of these would be the Zortech C++ compiler, the first (and to date only) C++-to-native compiler developed by a single person. The D programming language began in 1999 as an effort to pull the best features of these languages into a new one. Fittingly, D would use the by that time mature C/C++ back end (optimizer and code generator) that had been under continued development and maintenance since 1982. Between 1999 and 2006, Bright worked alone on the D language definition and its implementation, although a steadily increasing volume of patches from users was incorporated. The new language would be based on the past successes of the languages he'd used and implemented, but would be clearly looking to the future. D started with choices that are obvious today but were less clear winners back in the 1990s: full support for Unicode, IEEE floating point, 2s complement arithmetic, and flat memory addressing (memory is treated as a linear address space with no segmentation). It would do away with certain compromises from past languages imposed by shortages of memory (for example, forward declarations would not be required). It would primarily appeal to C and C++ users, as expertise with those languages would be readily transferrable. The interface with C was designed to be zero cost. The language design was begun in late 1999. An alpha version appeared in 2001 and the initial language was completed, somewhat arbitrarily, at version 1.0 in January 2007. During that time, the language evolved considerably, both in capability and in the accretion of a substantial worldwide community that became increasingly involved with contributing. The front end was open-sourced in April 2002, and the back end was donated by Symantec to the open source community in 2017. Meanwhile, two additional open-source back ends became mature in the 2010s: `gdc` (using the same back end as the GNU C++ compiler) and `ldc` (using the LLVM back end). The increasing use of the D language in the 2010s created an impetus for formalization and development management. To that end, the D Language Foundation was created in September 2015 as a nonprofit corporation overseeing work on D's definition and implementation, publications, conferences, and collaborations with universities.

Metadata: Crossref. Abstracts retain their original authors’ rights.

In the conversation

Original HN comments, with labels from simple text rules. A label describes the whole comment and may miss context or irony. Read the discussion to make up your own mind. About the labels

9 selected excerpts · 9 total mentions

teleforce
Neutral mention · rule
Try D it has most features that you just described. It feels Phytonic and it's GC by default[1]. There is an ongoing work for borrow checker for D language, and pardon the pun but I believe D is borrowing just the right amount features from Cyclon and Rust for safer compiled software without overly complex programming syntax. [1]Origins of the D programming language: https://dl.acm.org/doi/abs/10.1145/3386323
teleforce
Neutral mention · rule
Thanks for posting this project but it will be helpful if the link to directed to the original JOSS paper because it seems that nobody is referring it in the comments [1]. In Hennessey's and Patterson's Turing Award Lecture, "A New Golden Age for Computer Architecture", they lamented about the difficulty of mapping the the general purpose programming language (Python, Java, C, Fortran) onto the Domain-specific Architecture (DSA) and suggested that the best way is to utilize Domain-specific Language (DSL). They've pointed to the significant rise of DSL and specifically mentioned Matlab, TensorFlow, P4 and Halide as popular examples [2]. The fact that Matlab is by far the…
Read the full comment
most popular DSL compared to the other three is somewhat very interesting fact to note. From the Castor's JOSS paper when referring to Matlab and Julia, "Despite the many advantages that these languages have and their high popularity, many codes are still developed natively in Fortran, C, and C++, for practical or historical reasons. Even if there are tools to automatically generate C/C++ code from a high-level language (as Matlab Coder), this work is often done manually by specialists." This precisely my sentiment of the current data science languages and my thought is that why not a language that has best of both world, native compiled language and a seamlessly integrated data science DSL that's much more than a library? Enter D language, the only language that for several years now has BLAS library faster than the one implemented in Fortran [3], support C language in its latest compiler [4] and has been touted as the better C++ language by its authors [5]. What it really needs now is a seamlessly integrated DSL with Matlab syntax familiarity to win over the type A data scientist [6]. The DSL is better be implemented as CTFE that would enable higher level of integration with the D language [7]. As for another popular DSL mentioned in the Turing Lecture, TensorFlow, D has already has one minimalist TensorFlow (TF) alternative library and it's already faster than TF [8]. For the other two DSL, namely P4 and Halide, it will be probably happen sooner rather than later that the D alternatives will emerge and personally interested to explore P4 written in D language. [1] Castor: A C++ library to code “à la Matlab”: https://www.theoj.org/joss-papers/joss.03965/10.21105.joss.0... [2] A New Golden Age for Computer Architecture: https://cacm.acm.org/magazines/2019/2/234352-a-new-golden-ag... [3] Numeric age for D: Mir GLAS is faster than OpenBLAS and Eigen: http://blog.mir.dlang.io/glas/benchmark/openblas/2016/09/23/... [4] Adding ANSI C11 C compiler to D so it can import and compile C files directly: https://news.ycombinator.com/item?id=27102584 [5] Origins of the D Programming Language: https://dl.acm.org/doi/pdf/10.1145/3386323 [6] There are two types of data scientists — and two types of problems to solve: https://medium.com/@jamesdensmore/there-are-two-types-of-dat... [7] Compile-Time Sort in D: https://news.ycombinator.com/item?id=30317408 [8] Vectorflow: Minimalist neural network library faster than TensorFlow in D: https://news.ycombinator.com/item?id=31046675
WalterBright
Neutral mention · rule
In my paper "The Origins of the D Programming Language" I enumerate many direct influences aircraft design has had on D. https://dl.acm.org/doi/abs/10.1145/3386323#:~:text=The%20D%2.... BTW, I practice dual path in my personal life. If I'm doing something risky, I have a backup. For example, when I work under my car, I put the car on two sets of jackstands, even though I use stands that are rated for trucks. I'd never rely on a single rope/piton if rock climbing. I cringe when I see climbers doing that. I carry an extra coat in the car in winter, and water when driving in the desert.
teleforce
Neutral mention · rule
Can you please elaborate what kind of decision to make on D? It's a general purpose programming language with excellent metaprogramming capability. As a comparison, has Python decided what it wanted to be? A scripting language like Perl, data processing language like R, tool command language like TCL or web backend programming language like PHP or RoR? But nobody in their right mind will ever say Python need to decide on his direction when it grows old. As you probably have known when Python is around 20 years old (like D today), it played second or third fiddle to PHP, TCL, Ruby (RoR), Perl and R in their respective domains, and at the time the growing pain into Python 3…
Read the full comment
is yet to happen. But looks where is it now? Personally I think the D language foundation is already solid [1]. It just need a killer application for it to be more popular and well-known just like what RoR did to Ruby. And if you have a solid foundation, it will probably just a matter of time for it to properly take off. [1]https://dl.acm.org/doi/pdf/10.1145/3386323
teleforce
Neutral mention · rule
The question is why not? If creating a superset languages based on D will encourage more people to use D either directly or indirectly me think it's really worth it. Please check Terra language (now in beta), on how they created Lua like language to enable easier optimization in C++ and other languages [1]. They reported Terra-based autotuner for BLAS routines performs within 20% of ATLAS, and DSL for stencil computations that runs 2.3x faster than hand-written C [2]. According to D language origins paper, D is meant to be general-purpose programming language with support for procedural, object-oriented, generic, generative, and functional programming [3]. It'll be a…
Read the full comment
shame not to fully utilize the powerful nature of D. In addition, D also supports D language compiler DMD as a library [4], and there's also libDSL, a library for developing embedded domain specific languages in D via template metaprogramming [5]. [1]https://terralang.org/ [2]https://terralang.org/pldi071-devito.pdf [3]https://dl.acm.org/doi/pdf/10.1145/3386323 [4]https://dlang.org/blog/2017/08/01/a-dub-case-study-compiling... [5]https://dl.acm.org/doi/10.1145/2658761.2658770
WalterBright
Neutral mention · rule
> losing access to their GMail accounts and their entire digital life. This is why my email address is @ a domain that I own. Thus, if my hoster goes ventral fin up, I find another hoster. I might lose some time, but I won't lose everything permanently. My mail reader (Thunderbird) is also configured to always download all new email and delete it from the server. Hence I have backups going back 25 years, which has turned out to be valuable many times. One case was when I was reconstructing the timeline for "History of the D Programming Language" I had a solid resource rather than my barnacle-encrusted memory. https://dl.acm.org/doi/abs/10.1145/3386323

Keep following the thread.

More in Programming languages

More from the same topics.