From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Thien-Thi Nguyen Newsgroups: gmane.emacs.devel Subject: Re: [Suggestion] New function `emacs-version>=' Date: 02 May 2003 17:16:15 -0400 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <67B8CED503F3D511BB9F0008C75DAD66054855C9@dewdfx17> NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1051910998 23139 80.91.224.249 (2 May 2003 21:29:58 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 2 May 2003 21:29:58 +0000 (UTC) Cc: "Emacs-Devel \(E-mail\)" Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Fri May 02 23:29:52 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19Bi6K-00060g-00 for ; Fri, 02 May 2003 23:29:52 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 19Bi83-0008EK-00 for ; Fri, 02 May 2003 23:31:39 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19Bi2U-00067q-05 for emacs-devel@quimby.gnus.org; Fri, 02 May 2003 17:25:54 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 19BhxD-0003HW-00 for emacs-devel@gnu.org; Fri, 02 May 2003 17:20:27 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 19BhvR-0002YT-00 for emacs-devel@gnu.org; Fri, 02 May 2003 17:18:38 -0400 Original-Received: from colo.agora-net.com ([207.245.84.69]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19BhtP-00020u-00 for emacs-devel@gnu.org; Fri, 02 May 2003 17:16:31 -0400 Original-Received: from ttn by colo.agora-net.com with local (Exim 3.34 #1) id 19Bht9-0000Fz-00; Fri, 02 May 2003 17:16:15 -0400 Original-To: "Wedler, Christoph" In-Reply-To: "Wedler, Christoph"'s message of "Fri, 2 May 2003 21:55:31 +0200" Original-Lines: 45 X-Mailer: Gnus v5.7/Emacs 20.7 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:13633 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:13633 "Wedler, Christoph" 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