Archive for the 'D Programming Language' Category
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 | 2 Comments
I’m back from my three week vacation!
I had a great time, but as suspected I wasn’t able to stay away from computers. In the warm evenings, just for fun, I started to implement a ray tracer in the D Programming Language.
I have been looking for a suitable project that would give me a chance to [...]
October 28th, 2007 | Posted in D Programming Language, blogging, programming, research, software development, test-driven | No Comments
According to this slide show, the team behind D is thinking of incorporating an interesting addition to the language: The interchangability of a.foo(b) and foo(a, b).
This makes some interesting uses available. For instance, one could do something that looks a bit like monkey patching, adding functionality to library classes.
real round_to(real n, uint d) {
[...]
September 13th, 2007 | Posted in D Programming Language, programming | 4 Comments
It has been a vivid debate following my D doesn’t have real closures post. For most parts it has been a constructive discussion, but what I wanted to see was real examples that would convince me that real closures (those that carry the environment with them) were actually useful for a language that provides other [...]
September 13th, 2007 | Posted in D Programming Language, programming | No Comments
Note: This article was written before D got full closure support.
Delegates are something that gives me mixed feelings. While I used to embrace them in Delphi and Object Pascal, I now find them difficult to get used to in C#. I guess that is because they introduce a little of the functional programming paradigm into [...]
September 11th, 2007 | Posted in C#, D Programming Language, Delphi, java, programming | 16 Comments
In my previous post I mentioned that I wasn’t sure of how the D Contract Programming feature works in an override scenario. Wekempf inspired me to delve deeper into the matter. Here is what I found.
Contract Programming states that preconditions may be weakened by a deriving class, but never hardened. For postconditions the reverse is [...]
August 29th, 2007 | Posted in D Programming Language, programming, software development | No Comments
If you are a defensive programmer like me, you make heavy use of assertions to guard assumption you make in your code. For example, a method for adding an order item to an order object could look something like this:
class Order
{
private List orders;
int addItem(OrderItem item)
{
assert(assigned(item));
[...]
August 27th, 2007 | Posted in D Programming Language, programming, software development | 6 Comments
The floating point support in the D Programming Language is more advanced than that of standard C and C++. I’m not sure I like every aspect of it though. The thing I’m having problem with is how D handles the special value NAN (Not A Value).
For instance, a simple comparison will always return false if [...]
August 23rd, 2007 | Posted in D Programming Language, programming | 4 Comments
Agile software development techniques have long been utopia for low level system developers. The C programming language has been the most reasonable choice for implementing hardware near applications and drivers; But C was not designed with agility in mind. Hence methods like test driven development has been a pain to implement using C.
Now an alternative [...]
August 21st, 2007 | Posted in D Programming Language, programming, software development, test-driven | 4 Comments