unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: <emacs-devel@gnu.org>
Subject: dolist incompatible change - why?
Date: Tue, 22 Jan 2013 16:04:19 -0800	[thread overview]
Message-ID: <F8368BA9FDA84DABBE56E9A330C3F35C@us.oracle.com> (raw)

Since we are apparently no longer supposed to file bug reports about
not-yet-released NEWS, I raise the question here.

In Emacs Lisp before now, and in Common Lisp still, `dolist' argument VAR is
bound to nil during the evaluation of argument RESULT.

NEWS says this:

 ** `dolist' in lexical-binding mode does not bind VAR in RESULT any more.
 VAR was bound to nil which was not tremendously useful and just lead to
 spurious warnings about an unused var.

Huh?  The first problem with this is that neither it nor the doc string specify
what VAR _is_ bound to when RESULT is evaluated.  Howzat?

The other problem is why this change was made.  Was it really made because of
too many spurious warnings being issued?  That seems like a very weak, and
bass-ackwards reason.  (Yes, I realize that another reason was also given, but
that one seems weak too.)

Common Lisp has lexical scoping by default, but it specifically binds VAR to nil
during the evaluation of RESULT.  (And of course Common Lisp at least specifies
what VAR is bound to for RESULT.)

Why, in the Emacs Lisp version of `dolist', which supposedly emulates Common
Lisp `dolist', is this now being dropped (and the value and behavior becoming
unspecified)?

To be clear, I don't use a RESULT clause much, personally.  It just seems like
this change is a step backward, not forward.  Why do we need to do this?

http://clhs.lisp.se/Body/m_dolist.htm




             reply	other threads:[~2013-01-23  0:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-23  0:04 Drew Adams [this message]
2013-01-23  0:21 ` dolist incompatible change - why? Xue Fuqiao

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=F8368BA9FDA84DABBE56E9A330C3F35C@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    /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).