From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thien-Thi Nguyen Newsgroups: gmane.emacs.devel Subject: Re: Usefulness of (t nil) as the last sexp in (cond ...) constructs? Date: Sun, 19 Aug 2012 14:00:49 +0200 Message-ID: <87vcgfm6q6.fsf@zigzag.favinet> References: <87mx1rthxb.fsf@altern.org> <87a9xrazm7.fsf@Rainer.invalid> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1345378581 15212 80.91.229.3 (19 Aug 2012 12:16:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 19 Aug 2012 12:16:21 +0000 (UTC) Cc: emacs-devel@gnu.org To: Achim Gratz Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Aug 19 14:16:21 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1T34QW-0003aG-W5 for ged-emacs-devel@m.gmane.org; Sun, 19 Aug 2012 14:16:21 +0200 Original-Received: from localhost ([::1]:53754 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T34QV-00052Y-Mo for ged-emacs-devel@m.gmane.org; Sun, 19 Aug 2012 08:16:19 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:49822) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T34QS-00052N-QF for emacs-devel@gnu.org; Sun, 19 Aug 2012 08:16:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T34QR-0008L2-Uk for emacs-devel@gnu.org; Sun, 19 Aug 2012 08:16:16 -0400 Original-Received: from smtp206.alice.it ([82.57.200.102]:43436) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T34BU-0004eY-70 for emacs-devel@gnu.org; Sun, 19 Aug 2012 08:00:48 -0400 Original-Received: from zigzag.favinet (79.41.42.6) by smtp206.alice.it (8.6.023.02) id 500F3F95048EC88D; Sun, 19 Aug 2012 14:00:44 +0200 Original-Received: from ttn by zigzag.favinet with local (Exim 4.72) (envelope-from ) id 1T34Bf-0008CQ-SU; Sun, 19 Aug 2012 14:00:59 +0200 In-Reply-To: <87a9xrazm7.fsf@Rainer.invalid> (Achim Gratz's message of "Sun, 19 Aug 2012 13:29:52 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 82.57.200.102 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:152672 Archived-At: --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain () Achim Gratz () Sun, 19 Aug 2012 13:29:52 +0200 I'd expect it is optimized away when the byte-compiler [...] Well, no (not yet, until Someone teaches the byte-compiler about it): --=-=-= Content-Type: application/x-emacs-lisp Content-Disposition: inline; filename=cond-t-nil Content-Transfer-Encoding: quoted-printable (defun foo () (cond (backup-inhibited "hmm") (t nil))) foo (defun bar () (cond (backup-inhibited "hmm"))) bar (foo) nil (bar) nil (byte-compile 'foo) #[nil "\203=06=00\301\207\302\207" [backup-inhibited "hmm" nil] 1] (byte-compile 'bar) #[nil "\205=05=00\301\207" [backup-inhibited "hmm"] 1] (disassemble 'foo) | byte code for foo: | args: nil | 0 varref backup-inhibited | 1 goto-if-nil 1 | 4 constant "hmm" | 5 return | 6:1 constant nil | 7 return (disassemble 'bar) | byte code for bar: | args: nil | 0 varref backup-inhibited | 1 goto-if-nil-else-pop 1 | 4 constant "hmm" | 5:1 return --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable =2D-=20 Thien-Thi Nguyen ..................................... GPG key: 4C807502 . NB: ttn at glug dot org is not me . . (and has not been since 2007 or so) . . ACCEPT NO SUBSTITUTES . ........... please send technical questions to mailing lists ........... --=-=-=-- --==-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAlAw1XQACgkQZwMiJEyAdQJEZQCfehNFmpYwHAPG9eXdQvQfQXAC JOwAni7IA32tjPTjBHNAN67AT/GKAYiT =7DBg -----END PGP SIGNATURE----- --==-=-=--