Free at last! D language's official compiler is open source

Long held back by proprietary licensing issues, the D language's official compiler is now open source for all, a first step toward broadening its user base

Free at last! D language's official compiler is open source
NeuPaddy (CC0)

The D language, long an underdog among programmers, got a significant boost this past week when its developers received permission to relicense its reference compiler as an open source project.

DMD, the reference compiler for D, has been encumbered by legacy licensing, courtesy of Symantec. The license made it problematic to distribute the compiler in conjunction with other open source software -- for instance, in a Linux distribution -- and often sparked confusion about what it permitted.

All that changed when Symantec finally gave permission to allow DMD to be relicensed under the highly permissive Boost License.

Two other open source D compilers exist, GDC and LDC, but both have typically lagged in terms of their feature support for the language.

DMD's licensing is one likely reason why the D language, originally created as an evolutionary expansion of C/C++, has not enjoyed wider adoption. Most other recently created languages, such as Go and Rust, have their reference implementations available as open source projects.

Supporters of D cite many features that put it in the same class as Rust and Go in terms of convenience and safety: fast compilation times, garbage-collected memory management (with manual memory management also available), and strong interoperation with C/C++. But it stands out thanks to its static introspection functions and code-generation features, which allow compile-time optimizations that would be difficult in other languages.

Freeing up DMD means one fewer obstacle to wider acceptance of D, but not automatically so. D co-creator Andrei Alexandrescu has cited three key obstacles D would need to overcome: How its use of garbage collection by default alienated many C/C++ programmers, its "historical lack of vision," and the fact that it remains minimally used though it's been around for years. Relicensing DMD can address the first of those by allowing a broader base of developers to build more standard-library additions that don't depend exclusively on D's garbage-collected memory management.

But D also faces strong competition from other languages. Much of the potential user base for D may already have made commitments to Rust and Go, and newcomer languages like Nim are seeking their own comfort zones between security, speed, and convenience. Still, D can potentially make a case for itself in the face of those odds, and it has now added one more way to do so.

Copyright © 2017 IDG Communications, Inc.