On Sun, Sep 5, 2010 at 4:29 PM, Olivier Sannier <obo...@free.fr> wrote:
> Yeah, that's the problem I have. Maybe it's humor for the "compile then
> ship" part,

It was humor.  I was trying to make the point that just because
something compiles does not mean it is ready to ship.  I never meant
to imply that adding VER defines to detect the next version so the
code will compile, is enough to support a new version of Delphi.

Ideally, a new COMPILER constant shouldn't be needed at all.
Occasionally they are needed due to backwards compatibility not being
available.  Sometimes to address a bug in a specific version of
Delphi.  Often to take advantage of new features that older versions
do not have, but newer versions are not likely to drop.

My suggestion has nothing to do with lowering quality, but rather
simplifying the support of new versions.

Thorough code reviews, unit testing, automated testing, and other QA
processes still apply.  :)

> That's why I prefer it does not silently compile so that I have to review
> how it behaves with a new compiler version.

When a new version of Delphi breaks one of my components, it isn't
because they took away the Variants unit that was added in Delphi 6 or
because they took away the VCL enhancements that were added in Delphi
2009.  In my limited experience, most of the time that a _UP constant
is used in source code due to a change in Delphi, it doesn't have to
be undone later.

I can't depend on compiler errors (introduced by a missing compiler
version constant) to tell me that my component is broken in the new
version of Delphi.  Furthermore, it is a huge waste of my time to
chase down false issues because my code doesn't "believe" that the
features added in Delphi 7 are still present in Delphi XE.

Back when I used the VER defines, my first step was to change my
include file to assume that everything that was true in the previous
version is still true in the new version.  Then I reviewed "What's
Changed" documentation to see what applies to my components.  And then
I started code reviews and testing.  When I stopped using VER
constants, the only thing that changed is that I spend a lot less time
maintaining the include file.

-- 
Jon Robertson
Borland Certified Advanced Delphi 7 Developer
Good programming is 40% experience, 30% skill, 20% RTFM, 10% caffeine,
and 5% attention to detail.
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to