On Tuesday, 10 May 2016 at 14:47:05 UTC, Tomer Filiba wrote:
On Tuesday, 10 May 2016 at 12:27:19 UTC, Johan Engelen wrote:
We resort to enums whenever 'version' is not adequate like
this:
https://github.com/ldc-developers/ldc/blob/master/ddmd/globals.d#L18-L45
A good example -- which only proves how the current version()
block is insufficient. So instead of version(xxx), which states
your intent clearly, you get lots of non-idiomatic static ifs,
which are more cumbersome and error prone.
That example is misleading, as that was translated from C++ and
the host half of it was removed a couple months ago:
https://github.com/dlang/dmd/pull/5549/files
I'll submit a PR for the rest: I'm sick of this argument that
"ddmd is using static if, so why shouldn't I?"