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.

Reply via email to