The inspiration for this article was one written a few weeks ago entitled Working with Files in Go. In that article the author details numerous ways of interacting with files highlighting the capabilities of Go. I thought I would write a companion piece, this time detailing how to interact with files using the D programming language. Interacting with files is a fundamental task of any programming language and while such tasks are commonplace, it’s not entirely obvious how to achieve certain file related tasks using D. Hopefully this article will change that and show the simplicity and power of the D language when working with files.
After the success of the last article detailing hidden treasures in the D standard library, I thought I would write another highlighting why the D programming language coupled with its great standard library is surprisingly useful. The library itself is a vast beast and has been written by some exceptional programmers, so occasionally you stumble across some truly useful and well designed nuggets of code. This article shows a few more of these hidden treasures and provides examples of where they could be useful when used in your projects.
I’ve been using D for a number of years and i am constantly surprised by the hidden treasure i find in the standard library. I guess the reason for my surprise is that i’ve never exhaustively read the entire library documentation, i only skim it for what’s needed at any given time. I’ve promised myself i will read it thoroughly one day but until then i’ll enjoy these little discoveries. This article highlights a few of these hidden treasures which i hope you’ll enjoy learning about and will be useful for your future D projects.
This is an extension article to Templates in D explained where i introduce the alternative function syntax and how it complements template usage. This article will expand a little more on that syntax and make clear what is available in D and why.
An alternative syntax has not been included by accident but by design and as a result can potentially make code more complicated to understand and add more friction to first learning the language. This particular trade off, i believe is worth it, enabling particular features when using different paradigms.
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.
This is a good introduction to the D programming language by none other than the author himself. I’m a big fan of D and thought i would share this to educate any other interested developers.
The D Programming Language combines modeling power, modern convenience, and native efficiency into one powerful language. D embodies many new ideas in programming languages along with traditional proven techniques. Filmed at Lang.NEXT 2012, a cross-industry conference for programming language designers and implementers on the Microsoft Campus in Redmond, Washington. With three days of talks, panels and discussion on leading programming language work from industry and research, Lang.NEXT is the place to learn, share ideas and engage with fellow programming language design experts and enthusiasts. Native, functional, imperative, object oriented, static, dynamic, managed, interpreted… It’s a programming language geek fest.
I’ve recently been playing with D and realized it’s an awesome language capable of any task. I’ve also had a few ideas for native applications that i want to realize so i decided to explore the feasibility of building these using D.
Using D presents a little problem though, there is no standard GUI library! Don’t worry there are many third party GUI libraries available, one of these is GTK+ and luckily there are D bindings available to make using this library easy. Well, i say ‘easy’ (in inverted commas) because the installation and usage of these bindings is not very well documented, hence, this post. The actual procedure for installing and using them is actually quite easy once you know what to do, so lets start. I’ve separated the following instructions into Windows and Linux sections.