On Sunday, 29 April 2012 at 21:23:41 UTC, SomeDude wrote:
On Sunday, 29 April 2012 at 19:19:51 UTC, David Nadlinger wrote:
What I forgot to mention:
- VersionCondition: Just provide a mechanism to map command line flags to constants, probably in a magic »version« namespace, and use static if (e.g. »version (Foo)« -> »static if (version.Foo)«, »version (unittest)« -> »static if (unittest)«).

It sounds indeed nice, but I prefer convention over configuration. Experience has shown that it makes things simpler.

What exactly does this have to do with »convention over configuration«? The big problem with version conditionals is that they introduce a heavily restricted subset of static if, i.e. a whole new language construct, for questionable benefits.

David

Reply via email to