The D programming language is a very promising language. I propose here to do a quick review of some problems it is facing (or at least problems I’m facing when using it) and propose some solutions.
Immutability and constness in D2
I wanted to to a single, but writing it, it kept getting longer and longer. The point wasn’t to rant randomly, but also to make some proposal to improve things. So I did split it into smaller articles, and here the first one. We will discuss constness and immutability in D2.
I noticed that I was using a pattern of my own more and more. It is actually very usefull, for several reasons. It may have been used by other before me, but never saw a name for it.
This pattern can be used in any language that support first class function and hashtable, that is becoming more and more common (closure support was added in PHP as of version 5.3).