unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Drew Adams <drew.adams@oracle.com>
Cc: John Wiegley <jwiegley@gmail.com>,
	20241@debbugs.gnu.org,
	Artur Malabarba <bruce.connor.am@gmail.com>
Subject: bug#20241: 25.0.50; `setq' with only one argument
Date: Wed, 25 Nov 2015 17:22:12 +0000	[thread overview]
Message-ID: <20151125172211.GH2007@acm.fritz.box> (raw)
In-Reply-To: <fff8c7a2-d550-4c3d-b247-5bbc86ec5ef1@default>

Hello, Drew.

On Wed, Nov 25, 2015 at 08:27:43AM -0800, Drew Adams wrote:

[ .... ]

> But if you can DTRT now - analyze the code sufficiently and fix
> it properly or contact the author for an opinion - then that's
> the thing to do.

That's already been done with the Emacs core, and that's what I'd like
to do with elpa.  But code over which we have no control might be
problematic.

> Or if you just leave the code as is, but ensure that a runtime
> error is raised, that is also TRT.  It takes care of THIS bug,
> but it does not fix that bug (indicated by the error occurrence).

That would mean the users will suffer an error rather than the
maintainers.  And the Emacs team will get blamed for the breakage.

[ .... ]

> > > IMO, the bug should be fixed to raise an _error at runtime_,
> > > for both interpreted and byte-compiled code.

I think that a compiler generating a runtime error for a compile time
problem isn't a good idea.

[ .... ]

> The byte-compiler is not just some QA tool to check whether i's
> are dotted and t's are crossed.

No, but that is a significant part of its job spec.

[ .... ]

> > Why is this topic suddenly seeming complicated?  :-(

> I don't think it's complicated.  `setq' should raise an error
> when it is passed an odd number of arguments.  _That's all._
> The error should be raised when `setq' is invoked, obviously.

There are several different behaviours possible in both the interpreter
and compiler:

1. Interpreter:
  (a) Current behviour: silently insert a nil into the `setq'.
  (b) Throw an error (current new behaviour in emacs-25).
  (c) Issue a warning, but continue otherwise with (a).

2. Compiler:
  (a) Silently compile code which slips in a nil (current behaviour).
  (b) Issue a warning, but compile in the nil.
  (c) Issue an error, but compile in the nil.  (current new behaviour
    in emacs-25.)
  (d) Issue an error, and abort the compilation:
    (i) immediately.
    (ii) at the end of the source file.
  (e) Issue an error, and generate code to:
     (i) issue a warning, but carry on with the nil.
     (ii) throw an error.

You seem to favour 1(b) and, I think, 2(d)(ii) or 2(e)(ii).  I favour
1(b) and probably 2(c), possibly 2(e)(i).  To me, these possibilities
are complicated.  It's not a technical problem, it's a social problem:
who's going to be notified of the problem and when.  I would far rather
maintainers were hassled than users.

[ .... ]

-- 
Alan Mackenzie (Nuremberg, Germany).





  reply	other threads:[~2015-11-25 17:22 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-01 14:53 bug#20241: 25.0.50; `setq' with only one argument Drew Adams
2015-04-01 16:41 ` Stefan Monnier
     [not found] ` <mailman.3138.1427900048.31049.bug-gnu-emacs@gnu.org>
2015-11-23 14:31   ` Alan Mackenzie
2015-11-23 18:44     ` Glenn Morris
2015-11-23 18:54       ` Glenn Morris
2015-11-23 22:05         ` John Wiegley
2015-11-23 19:31       ` Alan Mackenzie
2015-11-24 11:32         ` Alan Mackenzie
2015-11-24 17:38         ` Glenn Morris
2015-11-24 18:04           ` Alan Mackenzie
2015-11-24 19:26             ` Artur Malabarba
2015-11-24 21:09               ` Alan Mackenzie
2015-11-25  1:46                 ` John Wiegley
2015-11-25  9:41                   ` Alan Mackenzie
2015-11-25 10:36                     ` Artur Malabarba
2015-11-25 11:07                       ` Alan Mackenzie
2015-11-25 11:13                         ` Artur Malabarba
2015-11-25 11:28                           ` Alan Mackenzie
2015-11-25 15:18                         ` Drew Adams
2015-11-25 15:40                           ` Alan Mackenzie
2015-11-25 16:27                             ` Drew Adams
2015-11-25 17:22                               ` Alan Mackenzie [this message]
2015-11-25 18:28                                 ` Drew Adams
2015-11-25 19:06                                   ` John Wiegley
2015-11-25 19:21                                     ` John Mastro
2015-11-25 19:22                                     ` Drew Adams
2015-11-25 19:34                                     ` Artur Malabarba
2015-11-25 19:40                                       ` John Wiegley
2015-11-25 20:20                                         ` Artur Malabarba
2015-11-25 20:37                                           ` John Wiegley
2015-11-26 11:07                                             ` Alan Mackenzie
2015-11-25 20:58                                         ` Alan Mackenzie
2015-11-25 21:19                                           ` Drew Adams
2015-11-25 21:52                                           ` John Wiegley
2015-11-26  0:21                                     ` Johan Bockgård
2015-11-26  8:58                                       ` Andreas Schwab
2015-11-26 12:06                                         ` Alan Mackenzie
2015-11-26 16:38                                           ` Artur Malabarba
2015-11-26 21:19                                             ` Alan Mackenzie
2015-11-27  0:07                                               ` Artur Malabarba
2015-11-25 13:11                       ` Nicolas Richard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151125172211.GH2007@acm.fritz.box \
    --to=acm@muc.de \
    --cc=20241@debbugs.gnu.org \
    --cc=bruce.connor.am@gmail.com \
    --cc=drew.adams@oracle.com \
    --cc=jwiegley@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).