Version statement
Walter Bright
newshound2 at digitalmars.com
Tue Dec 14 12:09:01 PST 2010
Nick Sabalausky wrote:
> But now, when you or someone else comes along and compiles it for OS_D, it's
> going to silently use the code for OS_B and OS_C *regardless* of whether or
> not that's correct for OS_D.
That particular problem has bitten me probably hundreds of times, and every
other programmer as well. And it happens for lots of things besides OS versions.
Though a programmer can always defeat the intent. At one point, someone added
"support" for another OS in Phobos by copy/pasting the support declarations from
another OS into the version block. Naturally, it was all wrong. The problem was
I didn't know which parts were copy/pasted, so I had to go through every single
declaration one at a time.
More information about the Digitalmars-d
mailing list