What are some features that you have discovered that you would
like to share with the community? For me, one thing I found
interesting was the ability to define structures dynamically
using mixins:
import std.stdio;
import std.format: format;
template MakePoint(string name, string x, string y) {
const char[] MakePoint = "struct %s {int %s; int
%s;}".format(name, x, y);
}
mixin(MakePoint!("Point", "x", "y"));
void main() {
auto pt = new Point;
pt.x = 1;
pt.y = 2;
writefln("point at (%s, %s)", pt.x, pt.y);
}