unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* dolist incompatible change - why?
@ 2013-01-23  0:04 Drew Adams
  2013-01-23  0:21 ` Xue Fuqiao
  0 siblings, 1 reply; 2+ messages in thread
From: Drew Adams @ 2013-01-23  0:04 UTC (permalink / raw)
  To: emacs-devel

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




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: dolist incompatible change - why?
  2013-01-23  0:04 dolist incompatible change - why? Drew Adams
@ 2013-01-23  0:21 ` Xue Fuqiao
  0 siblings, 0 replies; 2+ messages in thread
From: Xue Fuqiao @ 2013-01-23  0:21 UTC (permalink / raw)
  To: Drew Adams; +Cc: emacs-devel

On Tue, 22 Jan 2013 16:04:19 -0800
"Drew Adams" <drew.adams@oracle.com> wrote:

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

And I think that it is not a bug.

> The first problem with this is that neither it nor the doc string specify
> what VAR _is_ bound to when RESULT is evaluated.
And in (info "(eintr) dolist").

> 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?

I'm also curious about it.

-- 
Best regards, Xue Fuqiao.
http://www.emacswiki.org/emacs/XueFuqiao



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-01-23  0:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-23  0:04 dolist incompatible change - why? Drew Adams
2013-01-23  0:21 ` Xue Fuqiao

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).