Archive for the 'D Programming Language' Category
The D Programming Language has an impressive list of cool features. That is not always a good thing. A feature should contribute to the philosophy and foundation on which the language was built. If it doesn’t, harmony breaks down and the result is a language that is harder to learn and to use.
Some people think [...]
April 16th, 2008 | Posted in D Programming Language, programming | 19 Comments
I just watched an interview with Steve Yegge on the Google Code Blog. The interview was mostly about his current project Rhino on Rails. It was interesting, although not interesting enough to keep my attention for the entire 25 minutes. After some time I kind of tuned out, but I kept the video cast running [...]
April 1st, 2008 | Posted in D Programming Language | No Comments
The D programming language tries to make a clear distinction between comparison by equality and comparison by identity. It does so by offering two different operators, one for each purpose.
// Are a and b equal?
if (a == b) { … }
// Are a and b the same object?
if (a is b) { … }
As I’ve [...]
March 11th, 2008 | Posted in D Programming Language | No Comments
In a Reddit discussion following my last post on object lifetime management in D, bonzinip wondered why the D closures aren’t used with the open-closure-close idiom that is common, for instance, in Ruby.
bonzinip: languages with closures (Ruby, Smalltalk) use them to ensure that the file is closed when you get out of scope, and that [...]
February 13th, 2008 | Posted in D Programming Language | 5 Comments
The D Programming Language is a modern version of C. It adds productivity features to the performance power of C, features like object oriented programming and garbage collection.
It may seem strange that a language with focus on performance utilizes automatic memory management. A GC equals overhead, right? Well, actually that is a common misconception. These [...]
February 7th, 2008 | Posted in D Programming Language | 15 Comments
In my previous post on Loop Abstractions in D I showed you how we could make loop constructs abstract, in a similar way which is common in Ruby. The example I used as a model was the retryable method from Cheah Chu Yeow. His version is customizable in a way that let you define the [...]
January 31st, 2008 | Posted in D Programming Language | 4 Comments
One of the great things with Ruby is the natural way in which you can hide looping constructs behind descriptive names. Like the retryable example that Cheah Chu Yeow gives on his blog.
retryable(:tries => 5, :on => OpenURI::HTTPError) do
open(’http://example.com/flaky_api’)
end
Notice how elegantly the loop logic is abstracted; There’s no need to look at the [...]
January 17th, 2008 | Posted in D Programming Language, programming, ruby | 11 Comments
I have been playing around with the D Programming Language lately, and I love it. D combines the low-level control of C and modern productivity features like garbage collection, a built in unit-testing framework and - the most recent feature - real closures.
But D is still a young language, and as such a little rough [...]
November 6th, 2007 | Posted in D Programming Language | 23 Comments
An article I wrote for Sweden’s biggest computer magazine, Datormagazin, was published in the november issue. It’s an introduction to D, and I guess it’s the first time D gets mentioned in Swedish computer press.
November 4th, 2007 | Posted in D Programming Language | No Comments
Thank you Vladimir for bringing this to my attention.
I have reported on this blog that D doesn’t have real closures. My opinion was that it didn’t matter all that much, but many people thought otherwise. Now it seems like D got it after all. The latest release of the experimental 2.0 version announce full closure [...]
November 3rd, 2007 | Posted in D Programming Language | 1 Comment