原文
import core.stdc.stdio : printf;extern(C) void main()
{printf("Hello betterC\n");test();
}void test()
{enum test = foo();static if(test) {printf("Static object is created :)\n");S!int s;foreach(key, value; s.n){printf("Previous value %td: %d\n", key, value);s.push = key;}printf("New values: ");foreach(newValue; s)printf("%d ", newValue);printf("\n");} else {printf("Build error");}
}int foo()
{S!int s;return 1;
}struct S(T, size_t size = 8)
{T i;T[size] n = void;auto length() => size;auto empty() => i == 0;auto back() => i ? n[0] : T.init;auto push(R)(R data) => n[i++] = cast(T)data;auto front() => n[i - 1];auto popFront() => --i;
}