GNU bug report logs -
#72753
Different output between SBCL `loop` and Emacs `cl-loop`
Previous Next
Full log
View this message in rfc822 format
On Thu, 22 Aug 2024 01:55:07 +0000 Okamsn via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org> wrote:
> Hello,
>
> The following in SBCL 2.1.11 produces 3, which I expected.
>
> (loop for i in '(1 2 3)
> for j from 1
> finally (return j))
I get the same result with SBCL 2.4.5.
> The following in Emacs 29 produces 4, which I did not expect.
>
> (cl-loop for i in '(1 2 3)
> for j from 1
> finally (cl-return j))
I also get 4 with Emacs built from master.
> This is a simplified example that only shows the difference.
>
> I don't know what the standard behavior is, but I personally believe
> that the SBCL output makes more sense.
FWIW, GNU CLISP 2.49.93+ (built from the git repo) returns 4, not 3, for
the above Common Lisp loop sexp.
Steve Berman
This bug report was last modified 298 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.