I & D - part 1

I wanted to do this for a long time now, and since there's been a bit of interest in this I'm finally doing it: I'm writing a few lines about my experiences with writing a desktop application in the D programming language. This will be highly subjective, so please take everything I say with a grain of salt.

If you're reading this I assume that you already are more or less familiar with D, so I won't go into details about what D is and what D isn't. And you've probably had a look at boxen, the big (and at the moment only) project I'm doing in D.

First of all: there are two kinds of projects that I'm doing: there's boxen, and there's everything else. And as you can clearly see I'm using D for boxen, and other languages for everything else.

It really depends on why I'm doing a project. Do I want to do it because I want to reach a goal? At work, for example, I currently use Visual Basic and I don't really care. The language and the framework are just tools that get me where I need to go - in this case the magical land of "getting paid".

Or take MagicCounter for example - I just wanted a simple tool to keep score on my touchscreen laptop. I didn't find anything really usable, so I just hacked something together. C# was a natural choice, because it's a decent language and the .Net framework has everything and the kitchen sink already built in. If it's about scratching an itch I'll probably always chose something like C# over D - it simply gets the job done faster and with far less effort.

With a project like boxen, however, it's not about the destination at all. It's about the journey. I mean - come on. Does the world really need another audio player? Of course not - but that's not why I'm doing it. boxen is the software I want to write. And if you think about it there's a lot that D and boxen have in common: does the world really need another programming language like D? Of course not - but that's not why D exists at all.

That doesn't mean that you can't use D for a "scratch an itch" type of project. Especially if your itch can be scratched by a commandline utility then D is great. If you would normally use C++ and your new project actually only links against C libraries then use D. If you want to write a game engine (for FPS games for example) then D is a strong candidate.

But especially when it comes to GUI applications D can be a harsh mistress. Would I use D again? Yes, of course. D is probably as good as C-style languages can be. And in theory you could use it for everything. In practice there are good reasons why you probably would not want to use it, and I will go into more detail in the next part, which will be dedicated to the topic of bindings - because a big part of working in a programming language is what other libraries and APIs you can use in your own project.