Version statement
Nick Sabalausky
a at a.a
Tue Dec 14 12:21:31 PST 2010
"Walter Bright" <newshound2 at digitalmars.com> wrote in message
news:ie8j0d$1a95$1 at digitalmars.com...
> 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.
I can believe that.
>
> 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.
A good comparison utility like Beyond Compare or Ultra Compare would have
made that easy. I used Beyond Compare for the first time nearly ten years
ago, and from that moment until this day it's one of those things, like a
decent text editer, that I just couldn't do without.
More information about the Digitalmars-d
mailing list