I was reading the Swift Programming Language web pages, and looking at the section on conditional compilation. The tests for the #if clauses use hard-coded custom functions, operators, and operands. I noticed that, unlike (Objective-)C(++), there isn't any way for the user to contribute an operand. The user can't define a new flagging identifier in such a way that the conditional-compilation part of Swift can read and incorporate it. What about:
where "MyUserFlag" is an identifier added by the user on the command line or IDE equivalent. We could support the variant where the flag isn't just defined, but has a value. There can be:
definedAsVoid, for when the flag has no attached value
definedAsVersion, which is a period-separated chain of integers, maybe interpreted as
Then we need a way to extract the value (when it isn't
Void). Hmm, maybe we limit
extract(IDENTIFIER) for Boolean #defines, since Bool is the only type currently supported by conditional compilation.