From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.devel Subject: Re: Lexical byte-compilation warnings cleanup Date: Sun, 15 Sep 2013 12:33:35 -0700 Message-ID: <52360B8F.10904@dancol.org> References: <5cd4c948-8187-4901-8c17-1db4c7288fe7@default> <6daf4da3-1d3a-4f4c-9db8-7174fb6da584@default> <87wqnfg675.fsf@uwakimon.sk.tsukuba.ac.jp> <9c9d5439-3ef5-44a3-b886-bc95bddec03a@default> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="asQ55woUADwHRutJl2WFElepD0pTQLeFW" X-Trace: ger.gmane.org 1379273727 22415 80.91.229.3 (15 Sep 2013 19:35:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 15 Sep 2013 19:35:27 +0000 (UTC) Cc: "Stephen J. Turnbull" , Daniel Hackney , Drew Adams , Emacs development discussions To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Sep 15 21:35:30 2013 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 1VLI6T-0005tx-Ie for ged-emacs-devel@m.gmane.org; Sun, 15 Sep 2013 21:35:29 +0200 Original-Received: from localhost ([::1]:57794 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VLI6T-0005iu-4x for ged-emacs-devel@m.gmane.org; Sun, 15 Sep 2013 15:35:29 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38026) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VLI6G-0005b5-05 for emacs-devel@gnu.org; Sun, 15 Sep 2013 15:35:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VLI67-00038Q-JN for emacs-devel@gnu.org; Sun, 15 Sep 2013 15:35:15 -0400 Original-Received: from dancol.org ([2600:3c01::f03c:91ff:fedf:adf3]:49687) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VLI67-0002wO-DQ for emacs-devel@gnu.org; Sun, 15 Sep 2013 15:35:07 -0400 Original-Received: from c-76-22-66-162.hsd1.wa.comcast.net ([76.22.66.162] helo=[192.168.1.52]) by dancol.org with esmtpsa (TLS1.0:DHE_RSA_CAMELLIA_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1VLI5v-0006P3-L6; Sun, 15 Sep 2013 12:34:55 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 In-Reply-To: X-Enigmail-Version: 1.5.2 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2600:3c01::f03c:91ff:fedf:adf3 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:163361 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --asQ55woUADwHRutJl2WFElepD0pTQLeFW Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 8/20/13 9:49 PM, Stefan Monnier wrote: >>>> And the intention is? The design is? The reason is? >=20 > Check the calling convention used by the new byte-code representation > (used for lexically scoped code) and you'll see that there's no support= > for dynamic scoping in it. Adding such support "natively" would > slow down the common case too much. I think the current design is reasonable, and the byte-compiler warning provides some safety. We do, however, need to provide some warnings in cl-lib, because in some cases, we _can_ dynamically bind arguments. Consider this code: (defvar test (cons 1 2)) (defun* bar3 () (car test)) (defun* bar2 (&key test) (bar3)) (defun* bar1 () (bar2 :test (cons 3 4))) When bar2 parses its argument list, is _dynamically_ binds test, which test then picks up. bar1 returns 3. If we change test from a keyword argument to a regular argument, bar1 then returns 1, as expected. --asQ55woUADwHRutJl2WFElepD0pTQLeFW Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (Darwin) iQIcBAEBAgAGBQJSNguWAAoJEMAaIROpHW7I4zwQAMP4yeGlNTQiuUBsrQKVf/ks bTsL95y4h1RPJUO8ppYbwsJglqQFW6eLK4dcA1nuuH2pO82hIIVJuVUzWg1R8OeG sBoK+vcomhtpvdHMXc3Z2d06oFM/cOrYh54K5iO+ngeCAj4nkH8q6zxunP2q+p/X smVCx1hWPvbXqM+QQQJpAczpvCjJkzrM1q7s2zmnmmMEjF1gyBIiY+Yprtx03XK1 9NWnGgyoV7J94DhviW9CbueGJvuyE8r9JQBH2t04h4TsYYRCtlMiqyqAcHgLakuH G6Hhk4XoppahnMHol+foQlBLRu2R4aZ5Aln7C5+4jPYXkzqBkcLn3ERhenoP0fvf iUqZByUzFT5dKBRuBDsKB3Qe1/t2qtqGTaj0Jq5X1zzhOU1d2VNG+rUBOV+6UL1W Q6l8LnBldHrQO/9k45224Ob5sOJxc9hHg6l3Du1EQGEXLs4xezISvDVKQ2wu3CKU 2jM+YZ78Q4pXNWvnPryKXyFRGSI7KrKVSLKaRcrRlusbpzJwxm9aM74fFPtpWpCE DlBokuDXpYJDej5WsULUwcb6cLfk2sVQESTXsJMbO+1ku2SRfRCzI9oA82yBe8YA XQtWFfUrkXoFwY+SU3uN1oQYf+CVU8OLqtp91jnEmcb0vTbPsth5wD9LE2WDYH7Q 2g6+BsVY5JeWx1M6AocV =eYcl -----END PGP SIGNATURE----- --asQ55woUADwHRutJl2WFElepD0pTQLeFW--