Improving version(...)

F. Almeida francisco.m.almeida at gmail.com
Mon Oct 18 09:15:47 PDT 2010


The version() { ... } blocks would greatly improve from support of
boolean operators, which would make code much more readable.

Let us assume, for example, that I have several version identifiers
(VERSION1, VERSION2, VERSION3, VERSION4, etc.) and that a block of
code may be compiled in the cases of VERSION1 or VERSION3. It would
prove the simplest if one could simply use boolean operators to
express combinations of valid versions and thus be able to do


version(VERSION1 || VERSION3)
{
 // ...
}


More information about the Digitalmars-d mailing list