On Tuesday, 19 June 2018 at 19:03:44 UTC, 12345swordy wrote:
Why not use them if given the opportunity based on its context?

You can do that if you want
```
import std.stdio;
import core.stdc.stdio;

void main() @nogc {
    int a = 8;
    static if (__traits(compiles, new int(0))) {
        writefln("writeln %d", a);
    } else {
        printf("printf %d", a);
    }
}
```

Reply via email to