Free the DMD Compiler

Free the DMD Compiler

06 Mar 2009 – Warsaw

If you haven’t heard this one already, Digital Mars D Compiler (DMD) by Walter Bright has just been released with a full source code. That’s the good news, as the closed-source backend of DMD was pretty much repelling for some of the D programmers out there.

The bad news is that backend, while being Open Source, is not Free Software. As Walter explained in other thread on Reddit, some of its bits licensed from Symantec cannot be GPLed as is stated in the license.

Two things, and their consequences, seriously impair D’s widespread adoption and attracting a critical mass of developers. They are, namely, compiler hell and stdlib hell, both pretty unique to the language (and thus more dramatic) at the moment.

Compiler Hell. There are three D compilers out there and there’re issues with each one of them. DMD is not Free Software (thus is not included in official repositories of Debian and Ubuntu) and sucks at creating Linux shared libraries. GDC, being free from both aforementioned flaws, is lagging behind (version 4.2.4 20080705 (prerelease gdc 0.25 20080312, using dmd 1.024) (Ubuntu 0.25-4.2.4-3.1) on my ubuntu here). And there is the new kid, LLVM D Compiler, furiously developed by its authors and even recently announced to be in pretty workable state, but it’s still very fresh, untested and requires some development.

Standard Library Hell boils down to Phobos vs. Tango, an issue that’s still (despite some efforts to bridge both libs) a pain in the ass for many D programmers. I’m not going to elaborate on this one, even despite having a lot to say about the topic (I’m not in a mood for rants).

Generally speaking, if you’re here reading this, you probably already know and dwelled into both hells. So, what’s the point of this post?

The point is that, I like DMD and I’m full of respect for Walter Bright — the man knows and has insane amounts of experience about writing compilers, designed this great language he called “D” (probably should have called it after a beverage, animal, rare stone or just add another strange character to C) and still has enough modesty to admit that DMD has flaws and that not his, but the other stdlib’s (Tango) developers were right when it comes to designing standard library for D. I don’t want DMD, probably together with the language the most notable project of man’s life, to be forgotten or abandoned only because some pieces of code were licensed in a way that impaired its adoption (most ambitious and language-curious programmers are using linux and/or Mac OS X) and prevented code-exchange between D compilers. I think it would even be easier to make DMD produce working .so files (I need that for RuDy) than to develop the two other compilers to implement (and do it right) all the features of D 2.0 that DMD already has.

So, what to do? Simple.

Free the DMD Compiler

Let us, D programmers and enthusiasts, do it! How? “Buy” the code from Symantec, that is to pay for licensing it in a GPL-compatible (or, generally, Free Software compatible) way. Generally speaking, it’s about doing the same thing that community did for Blender.

Who’s in?

And who knows how much would Symantec charge for relicensing these pieces of backend code?