unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Thien-Thi Nguyen <ttn@glug.org>
Cc: "Emacs-Devel \(E-mail\)" <emacs-devel@gnu.org>
Subject: Re: [Suggestion] New function `emacs-version>='
Date: 02 May 2003 17:16:15 -0400	[thread overview]
Message-ID: <jkof2loxr4.fsf@glug.org> (raw)
In-Reply-To: "Wedler, Christoph"'s message of "Fri, 2 May 2003 21:55:31 +0200"

"Wedler, Christoph" <christoph.wedler@sap.com> 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.

thi

  parent reply	other threads:[~2003-05-02 21:16 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-02 19:55 [Suggestion] New function `emacs-version>=' Wedler, Christoph
2003-05-02 21:00 ` Juanma Barranquero
2003-05-02 21:14   ` Stefan Monnier
2003-05-02 21:35     ` Juanma Barranquero
2003-05-03 11:12       ` Ehud Karni
2003-05-03 13:54         ` Juanma Barranquero
2003-05-03 16:08           ` Stephen J. Turnbull
2003-05-04 19:15             ` Juanma Barranquero
2003-05-06 11:05               ` Stephen J. Turnbull
2003-05-04 13:04           ` Richard Stallman
2003-05-03 17:48     ` Reiner Steib
2003-05-03 18:42       ` Stefan Monnier
2003-05-05 13:47         ` sort-coding-systems in 21.3 and RC branch (was: New function `emacs-version>=') Reiner Steib
2003-05-06  7:08           ` Kenichi Handa
2003-05-02 21:16 ` Thien-Thi Nguyen [this message]
2003-05-04 13:03 ` [Suggestion] New function `emacs-version>=' Richard Stallman
2003-05-05 12:52   ` Wedler, Christoph
2003-05-05 13:20     ` Juanma Barranquero
2003-05-05 19:11     ` Richard Stallman
2003-05-05 21:59     ` Luc Teirlinck
2003-05-06 23:42 ` Istvan Marko
  -- strict thread matches above, loose matches on Subject: below --
2003-05-06 11:10 Wedler, Christoph
2003-05-06 21:45 ` Luc Teirlinck
2003-05-07 11:51 ` Richard Stallman
2003-05-07 12:11 Wedler, Christoph
2003-05-07 12:46 ` Luc Teirlinck
2003-05-09 11:19 ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jkof2loxr4.fsf@glug.org \
    --to=ttn@glug.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).