On 24/10/2012 10:40, Don Clugston wrote:
On 23/10/12 05:17, 1100110 wrote:
Looking at std.io (hopefully the right version maybe?) I see this:
version(OSX)
{ do something; }
version(Windows)
{ do the same thing as above; }
version(FreeBSD)
{ ditto; }
version(Linux)
{finally do so
On 23/10/12 05:17, 1100110 wrote:
Looking at std.io (hopefully the right version maybe?) I see this:
version(OSX)
{ do something; }
version(Windows)
{ do the same thing as above; }
version(FreeBSD)
{ ditto; }
version(Linux)
{finally do something different; }
and:
version(Windows)
On 10/22/2012 9:26 PM, timotheecour wrote:
> Another point is that we are sometimes too lazy to write statements as
follows:
> version (linux){ version = linuxOrBSD;}
> version (BSD){ version = linuxOrBSD;}
> version(linuxOrBSD){do_something;}
> (that's ugly but it's the official recommended wa
On 10/22/2012 8:17 PM, 1100110 wrote:
> The last one could be intuitively described as:
> version(Windows && DigitalMars)
> { blah; }
It was a very deliberate design choice to not allow !, || or && in version
statements. Such tend to devolve over time into unmaintainable chaos.
On Tuesday, 23 October 2012 at 04:32:02 UTC, 1100110 wrote:
On Mon, 22 Oct 2012 22:31:43 -0500, Jesse Phillips
wrote:
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
On Mon, 22 Oct 2012 22:31:43 -0500, Jesse Phillips
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
Indeed, having version logic has been requested many times before.
For example:
http://www.digitalmars.com/d/archives/digitalmars/D/learn/Can_I_do_an_or_in_a_version_block_33426.html
http://www.digitalmars.com/d/archives/digitalmars/D/11946.html
quote from those:
"Walter would reject it. He has s
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) {}
mad
Looking at std.io (hopefully the right version maybe?) I see this:
version(OSX)
{ do something; }
version(Windows)
{ do the same thing as above; }
version(FreeBSD)
{ ditto; }
version(Linux)
{ finally do something different; }
and:
version(Windows) version(DigitalMars)
{