DMD 1.028 and 2.012

March 7th, 2008 | by Aldacron |

Walter has announced new versions of both the 1.x and 2.x DMD branches. The new 1.x version is, as always, mostly a collection of bug fixes, but it does share one new feature with the 2.x branch: comparing class types against null (using the == operator) now results in a compile time error. That should cut down on the number of D newbies getting bit by access violations they can’t track down.

As for 2.012, a boat load of new stuff there, most of it being in Phobos. The big changes that I’m looking at are the new predefined version(unittest), struct destructors and struct postblits (which are, effectively, copy constructors). Walter emphasized that struct constructors aren’t in yet. But you can be sure that some time in the near future the old static opcall struct trick will be a thing of the past for users of D 2.

If you are new to D, you should know that 1.x is considered stable and should be used for production (if you are willing to use D for production at all), while the 2.x branch is a moving target.

The const/invariant stuff still scares the bejeezus out of me, but the rest of D 2 is looking schweet. I’m not going to touch it, though, until it gets nice and locked down.

Technorati Tags: , , ,

Post a Comment