[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Suggestion] New function `emacs-version>='

From: Thien-Thi Nguyen
Subject: Re: [Suggestion] New function `emacs-version>='
Date: 02 May 2003 17:16:15 -0400

"Wedler, Christoph" <address@hidden> writes:

    - I need to check the availibility for feature/fix A
    - feature/fix A is provided with Emacs-X.Y
    - therefore I test with (emacs-version>= X Y)

for features and fixes it's best to be direct.  if `fboundp' is not
direct enough, use something that is.  (using a version number is
completely indirect.)

a test using the version number is made obsolete by any number of
scenarios, one of which is called parallel changes:

        version 1:
                A => X
                B => Y
                A*B => Z

        version 2:
                A => XX
                B => Y
                A*B => Z

        version 3:
                A => XXX
                B => YYYY
                A*B => Z

here, A and B are pieces of code, A*B is their interaction, and X, Y and
Z are some user- or programmer-visible behaviors.

Z is what you want (as in ZZZZZ as in a nice nap on a sunny day :-).  if
you check Z directly, you notice no change and life is good.  if you
check Z indirectly by checking A or B or A*B (or X or Y or combinations
thereof), you have many more ways to screw up and incorrectly conclude
the wrong thing.

apologies if this is not completely clear, i'm feeling sleepy for some
reason....  there are other scenarios, too, that perhaps someone can
while away a few minutes pointing out.  anyway, having gone through the
pain of conditionalizing based on version numbers for my own code (and
then arriving at understanding much later), i recommend against the
practice now, seductive as it may appear on the surface.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]