emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

dolist incompatible change - why?


From: Drew Adams
Subject: dolist incompatible change - why?
Date: Tue, 22 Jan 2013 16:04:19 -0800

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 via email to

[Prev in Thread] Current Thread [Next in Thread]