From debbugs-submit-bounces@debbugs.gnu.org Fri May 13 10:25:22 2011 Received: (at submit) by debbugs.gnu.org; 13 May 2011 14:25:22 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QKtIv-0004sW-Om for submit@debbugs.gnu.org; Fri, 13 May 2011 10:25:22 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QKtIu-0004sK-4V for submit@debbugs.gnu.org; Fri, 13 May 2011 10:25:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QKtIn-0007Rr-W2 for submit@debbugs.gnu.org; Fri, 13 May 2011 10:25:14 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:45872) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QKtIn-0007Rn-UU for submit@debbugs.gnu.org; Fri, 13 May 2011 10:25:13 -0400 Received: from eggs.gnu.org ([140.186.70.92]:53661) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QKtIm-0006Jr-Qf for bug-gnu-emacs@gnu.org; Fri, 13 May 2011 10:25:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QKtIl-0007RY-Ow for bug-gnu-emacs@gnu.org; Fri, 13 May 2011 10:25:12 -0400 Received: from rcsinet10.oracle.com ([148.87.113.121]:64439) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QKtIl-0007RL-Jf for bug-gnu-emacs@gnu.org; Fri, 13 May 2011 10:25:11 -0400 Received: from rtcsinet21.oracle.com (rtcsinet21.oracle.com [66.248.204.29]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id p4DEP5Sw010272 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 13 May 2011 14:25:07 GMT Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by rtcsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id p4DEP44r011576 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 13 May 2011 14:25:05 GMT Received: from abhmt015.oracle.com (abhmt015.oracle.com [141.146.116.24]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id p4DEOxfT031799; Fri, 13 May 2011 09:24:59 -0500 Received: from dradamslap1 (/10.159.43.79) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 13 May 2011 07:24:59 -0700 From: "Drew Adams" To: "'Kevin Rodgers'" , References: <1273A111E1924DE9BAB49AFE6257D462@us.oracle.com><5328177EA0C84361A654BB5EEB201D1C@us.oracle.com> Subject: OT: bug#8667: 24.0.50; `bounds-of-thing-at-point' returns (N . N) for `comment' Date: Fri, 13 May 2011 07:24:56 -0700 Message-ID: <782D11B8AC634A0CBBA9234C66ECF816@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcwRMpyV6eNgrx6ERPW/Cnqd55AM8AAPfW9w X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6090 In-Reply-To: X-Source-IP: rtcsinet21.oracle.com [66.248.204.29] X-CT-RefId: str=0001.0A090201.4DCD3F44.0044:SCFSTAT5015188,ss=1,fgs=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -6.5 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.5 (------) > > (Dunno why some people insist on using `(if (and...) > > singleton)'. It gets in the way of readability and just > > represents extra noise. Binary `if' is generally an > > impediment to readability and communicating intention.) > > Readability is in the eye of the beholder, intention is in > the mind of the author. Which is why I said "readability AND communicating intention". And I said "COMMUNICATING intention", not just "intention". Communicating involves both the writer and the reader. If the writer's intent is to be communicated well then readers need to be able to grasp it easily by reading. > Personally, I think (if (and...) result) communicates the > intent more clearly than (and ... result) Really? What's the intent? The result of evaluating (and A B C D E) is pretty clear: nil or E. You write that which way? What does adding `if' do for you? You can add `if' quite a bit, but what does it help? (and A B C D E) (if (and A B C D) E) - clearer? (if (if (and A B C) D) E) - even clearer? (if (if (if (and A B) C) D) E) - yet clearer? (if (if (if (if A B) C) D) E) - clearest? To each his own... The problem with binary `if' is that it requires more careful parsing, to distinguish a single sexp from two (2 sexps from 3). It can be pretty easy to mistake a binary for a ternary `if', or vice versa, depending on the actual argument sexps. But if you know that a writer systematically uses: (a) `when' and `unless' to indicate that the result is unimportant/unused (only side effects matter), (b) `if' only as ternary, never binary, (c) `and' and `or' when args are to be eval'd in order and the result is significant/used then it is very quick to follow the code's meaning and author's intent. Coming across a binary `if' in this context then raises a red flag. Of course, when debugging a section of code that is problematic you must always double-check that the writer actually respected the convention, but otherwise it's a breeze. Is this a widespread convention? Yes and no. Many writers of Common Lisp follow it; some (many?) do not. It helps when you pretty much know that the writer follows it (e.g. when I read my own code). All bets are off if no convention is followed wrt these functions. Personally, I consider use of `if' when the result is not important, and use of `when' or `unless' when the result matters, to be perverse. The other parts of the convention are less important/useful, to me. If you want to super-if-ify the Emacs source code, as above, feel free. Reduce all uses of `and' to binary `and' if you want, or eliminate use of `and' altogether. From debbugs-submit-bounces@debbugs.gnu.org Fri May 13 12:46:18 2011 Received: (at control) by debbugs.gnu.org; 13 May 2011 16:46:18 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QKvVK-0000RA-D0 for submit@debbugs.gnu.org; Fri, 13 May 2011 12:46:18 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QKvVJ-0000R0-4A for control@debbugs.gnu.org; Fri, 13 May 2011 12:46:17 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1QKvVD-0004MI-GO for control@debbugs.gnu.org; Fri, 13 May 2011 12:46:11 -0400 Date: Fri, 13 May 2011 12:46:11 -0400 Message-Id: Subject: control message for bug 8667 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -6.3 (------) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.3 (------) merge 8670 8667 From unknown Fri Aug 15 20:52:39 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: Did not alter fixed versions and reopened. Date: Thu, 19 May 2011 17:10:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # Did not alter fixed versions and reopened. thanks # This fakemail brought to you by your local debbugs # administrator From unknown Fri Aug 15 20:52:39 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: Did not alter fixed versions and reopened. Date: Thu, 19 May 2011 17:20:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # Did not alter fixed versions and reopened. thanks # This fakemail brought to you by your local debbugs # administrator From unknown Fri Aug 15 20:52:39 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: Did not alter fixed versions and reopened. Date: Sat, 21 May 2011 14:48:02 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # Did not alter fixed versions and reopened. thanks # This fakemail brought to you by your local debbugs # administrator From unknown Fri Aug 15 20:52:39 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 19 Jun 2011 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator