On Mon, 22 Oct 2012 22:31:43 -0500, Jesse Phillips <jessekphillip...@gmail.com> wrote:

On Tuesday, 23 October 2012 at 03:22:08 UTC, 1100110 wrote:
So I guess in the end I am proposing a change.
A change that I cannot see breaking backwards compatibility while also shortening code duplication.
It also seems much more 'intuitive' to me.

version(Windows) version(DigitalMars) {}
made me think twice to make sure I knew what it was doing.

What do you guys think? If this was implemented, how could it break backwards compatibility?
Is something like this worth a change?
Are there any drawbacks to this idea?

This "issue" comes once in a while. The suggested solution:
[snip]

Not necessarily more concise but it can add description to what the actual version being created.

That is true, and I do recall that version = something; now that I think about it.

It just seems to me that version statements are essentially booleans, and could be easily rewritten as: static if(true || false || false) { } by the compiler, similar to how (I *think*) certain binary operators are rewritten.
(I'm just going by what I hear, I'm not really a compiler kinda guy...)

It would make sense to me to be able to use boolean operators on what is essentially
a true/false statement.

I'd be willing to see if I can hack together support for it, as a proof of concept,
but I wanted to see if it would be blatantly shot down first.

So... What I'd really like to know is: Would *you* welcome such a change?
--
Using Opera's revolutionary email client: http://www.opera.com/mail/

Reply via email to