Denis Koroskin wrote:
On Tue, 10 Feb 2009 17:14:00 +0300, Don <nos...@nospam.com> wrote:

Derek Parnell wrote:
On Tue, 10 Feb 2009 13:08:03 +0100, Don wrote:

A&&B is not so terrible, since you can do it by nesting, as above.
The big problem is A || B. It creates a mess.
 version(A) version = AorB;
version(B) version = AorB;
version(AorB) {
  . . .
}

Yes. And that sucks, because you've got the version statement in two places. And you've had to create an essentially meaningless temporary. [1] Then when you have a more complex expression, especially where A and B appear more than once, it gets disgusting.


[1] I know Walter's idea is that you create meaningful identifiers, but in practice this kind of versioning can be a workaround. EG B is "everything except WindowsME".

Version has so many shortcomings that it should definitely be redesigned.

My biggest complaint is that code inside version () {} block should be semantically correct.

Just syntactically correct.

Reply via email to