remove keywords

mandel oh at no.es
Fri Dec 7 03:09:32 PST 2007


On Fri, 07 Dec 2007 02:47:36 -0800, Walter Bright wrote:
> The version statement is limited in that you cannot do !foo or
> foo&&bar||baz. Rather than a bug, that is deliberate. I've seen a lot of
> code that, over the years, accumulated detritus like:
> 
>      #if FOO || BAR>0x1234 && BAZ && !HACK
> 
> These tend to snarl themselves into such a rat's nest of conditionals
> the only way to figure out which lines actually got compiled was to
> examine the preprocessor output. (Another consequence of these is that,
> inevitably, the various conditionals were WRONG as they were layered on
> by people who didn't really understand the code.)
> 
> So, by limiting the version statement, the idea is to encourage the
> programmer to think in terms of distinct versions being generated, and
> then code in terms of those distinct versions - each of those versions
> having a name.

I'am aware of that problem and understand the design decision.
Still, I can't get rid of the desire to give more power to the programmer
by simplifying stuff. :>
But I can code with the way it is.



More information about the Digitalmars-d mailing list