This Week in D January 17, 2016

Welcome to This Week in D! Each week, we'll summarize what's been going on in the D community and write brief advice columns to help you get the most out of the D Programming Language.

The D Programming Language is a general purpose programming language that offers modern convenience, modeling power, and native efficiency with a familiar C-style syntax.

This Week in D has an RSS feed.

This Week in D is edited by Adam D. Ruppe. Contact me with any questions, comments, or contributions.

Statistics

Major Changes

The new dlang.org website design is live.

LDC 0.17.0-beta1 has been released!

And Beta D 2.070.0-b2 has been released.

In git, D also gained more support for catching C++ exception, and the website is getting better interlinking capability.

In the community

Community announcements

See more at the announce forum.

Tip of the Week

Here's a quick debugging tip: when testing code, you can paste this line scattered throughout your code to get it to print out the last line executed:

import std.stdio;writeln(__LINE__); // know which line was last executed

The magic tokens in D, __LINE__, __FILE__, __FUNCTION__, __MODULE__, and __PRETTY_FUNCTION__, are all replaced at compile time with information about their context, and best yet, can even appear as default arguments in a function to get information about the call site!

The Exception constructor uses default arguments of __LINE__ and __FILE__ to store the place where the exception was constructed, and this works in any function.

Between default arguments and convenient single lines you can easily cut and paste around to help debug code, these magic tokens are really helpful to remember.

Learn more here in the spec.

Learn more about D

To learn more about D and what's happening in D: