On Wed, Jun 5, 2013 at 10:04 AM, Jonathan M Davis
<jmdavisProg@gmx.com> wrote:
On Wednesday, June 05, 2013 02:28:16 Timothee Cour wrote:
> Just figured out we can do this. Could this be added to phobos?
[snip]
Walter is flat-out against anything which involves &&ing or ||ing version
identifiers. It's not like it would be hard to add to the language, but he
thinks that it's outright bad practice.
DRY and clarity is more important (look at the horrible contorsions one has to do, eg in the example I provided above). This has been asked for many times. Once more, it would be great to have a voting system to see if there's clear majority on either side.
If we were going to add this, I would
expect us to just add it to the language, not to the library. So, I'd be
surprised if anything like this ended up in Phobos.
What i described fits more with the rest of the language (and doesn't require language change).
It allows:
static if( condition && versions.OSX){ ...}
//or:
auto foo = condition && versions.OSX;
(where condition is arbitrary).
A language proposal (eg version(OSX || Windows) ) would not allow it.