From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#20241: 25.0.50; `setq' with only one argument Date: Wed, 25 Nov 2015 11:22:31 -0800 (PST) Message-ID: <6802dd57-972f-4053-b044-597592a74ba3@default> References: <20151124180452.GB1840@acm.fritz.box> <20151124210956.GC1840@acm.fritz.box> <20151125094155.GB2007@acm.fritz.box> <20151125110755.GC2007@acm.fritz.box> <20151125154030.GF2007@acm.fritz.box> <20151125172211.GH2007@acm.fritz.box> <5c5c14de-444e-4847-b91a-e7dff29b3f58@default> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1448479403 8748 80.91.229.3 (25 Nov 2015 19:23:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 25 Nov 2015 19:23:23 +0000 (UTC) Cc: Alan Mackenzie , 20241@debbugs.gnu.org, Artur Malabarba To: John Wiegley Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Nov 25 20:23:07 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1a1fel-00035i-HE for geb-bug-gnu-emacs@m.gmane.org; Wed, 25 Nov 2015 20:23:07 +0100 Original-Received: from localhost ([::1]:47308 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1fen-0007Hd-AD for geb-bug-gnu-emacs@m.gmane.org; Wed, 25 Nov 2015 14:23:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56217) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1fej-0007HX-Eo for bug-gnu-emacs@gnu.org; Wed, 25 Nov 2015 14:23:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a1feg-00086g-Aj for bug-gnu-emacs@gnu.org; Wed, 25 Nov 2015 14:23:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35209) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1feg-00086c-6m for bug-gnu-emacs@gnu.org; Wed, 25 Nov 2015 14:23:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1a1fef-0007x1-RK for bug-gnu-emacs@gnu.org; Wed, 25 Nov 2015 14:23:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Nov 2015 19:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20241 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20241-submit@debbugs.gnu.org id=B20241.144847935730518 (code B ref 20241); Wed, 25 Nov 2015 19:23:01 +0000 Original-Received: (at 20241) by debbugs.gnu.org; 25 Nov 2015 19:22:37 +0000 Original-Received: from localhost ([127.0.0.1]:53150 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a1feH-0007w9-C0 for submit@debbugs.gnu.org; Wed, 25 Nov 2015 14:22:37 -0500 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:20168) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a1feE-0007w0-5g for 20241@debbugs.gnu.org; Wed, 25 Nov 2015 14:22:35 -0500 Original-Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id tAPJMXsI017777 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 25 Nov 2015 19:22:33 GMT Original-Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0022.oracle.com (8.13.8/8.13.8) with ESMTP id tAPJMWrt026717 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Wed, 25 Nov 2015 19:22:32 GMT Original-Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id tAPJMWS4001398; Wed, 25 Nov 2015 19:22:32 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6691.5000 (x86)] X-Source-IP: aserv0022.oracle.com [141.146.126.234] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:109256 Archived-At: > > My preference for the compiler is to (a) let you know there are syntax > > problems, and where they are, and (b) generate code that acts the same > > as the interpreted code: in this case, raise a runtime error. >=20 > Let's take a different case as a behavorial example: The code: (funcall) > Interpreted: Raises an error: eval: Wrong number of arguments: > funcall, 0 > Byte-compilation: No warnings or errors printed. > Loading of .elc: Raises an error: load: Wrong number of arguments: > funcall, 0 >=20 > I think that we should be consistent in our behavior. Mis-using Emacs Lis= p > is not a reason to fail to byte-compile, even if it is a reason for it to > fail to evaluate or load. >=20 > A separate argument could be made that bad code shouldn't compile, but > that's orthogonal to this discussion, and too big a pill to swallow for > 25.1. I think we are agreeing, unless I'm missing something (?). In the case of `funcall', which is a function, the byte-compiler could conceivably, in some cases, point out a syntax error that a missing FUNCTION arg is required for `funcall'. It could not point that out in all cases. For example: (apply #'funcall (some-sexp)), might end up applying `funcall' to (). But in many cases it could find syntax errors of this kind. `setq' is not a function (you cannot pass `setq' to `apply'), so it is generally easier to check its syntax. Whatever problems the byte-compiler finds and reports are welcome, but the mere fact of reporting problems does not obviate the need for runtime errors when incorrect syntax is used. And certainly byte-compilation should not try to "correct" code (any more than the interpreter should) by, for example, implicitly providing a nil arg for `setq'. That's just plain wrong, IMO.