Templates in D explained

Let’s get one thing straight from the outset, template metaprogramming scares the hell out of most developers! I have no idea why, probably because it simply sounds scary? Whatever the reason, many developers shy away from even learning about such techniques, let alone use them. This is such a shame because templates offer a superb tool for programming at a higher level of abstraction which is something that can aid in better program design.

Even though many programming languages support template metaprogramming this article is about using templates in D. D is one of the best languages i have ever used and the more i use it the more i realise it’s getting everything just right. Hopefully this article will remove the above fear and educate developers on what can be achieved.

Forget currying, use partial application

I’m currently reading more about advanced JavaScript design patterns and an interesting concept i’ve come across a lot is Currying and Partial Application. For years i’ve used partial application but not known its name or how it can be used to its fullest, so it was a pleasant surprise to read more and fully understand it. Currying on the other hand is partial application’s more serious cousin and something i’ve never really used. Here follows the differences and why they may or may not be useful.