emacs-devel
[Top][All Lists]
Advanced

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

Re: master 8f0f851: * lisp/autoarg.el: Use lexical binding.


From: Stefan Monnier
Subject: Re: master 8f0f851: * lisp/autoarg.el: Use lexical binding.
Date: Wed, 29 Apr 2020 00:02:25 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> Conceptually, RESULT is a neat way to have the DOLIST/DOTIMES/DO
> expression evaluate to a useful value,

It's not.  Putting the return value right after (wrapping the two in
a `progn` if needed) is a much neater solution, which is also visually
much better at clarifying what is returned.

The only potential usefulness of the RETURN part is to get access to the
"after-last" value of the iteration variable (which is the only
concrete difference between using RESULT or placing the result as
a separate expression after the iteration).

> Deprecating RESULT makes it harder to port Common Lisp code to Elisp.

I have tried to port a few Common Lisp codes to Elisp, and this kind of
syntactic rewrite is so trivial to handle (and the dotimes/dolist macros
could even tell you how to do them) that it doesn't even register in
comparison to the much harder work of dealing with library differences,
packages, reader macros, ...


        Stefan




reply via email to

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