GNU bug report logs - #72753
Different output between SBCL `loop` and Emacs `cl-loop`

Previous Next

Package: emacs;

Reported by: Okamsn <okamsn <at> protonmail.com>

Date: Thu, 22 Aug 2024 01:57:01 UTC

Severity: normal

Full log


Message #14 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Robert Pluim <rpluim <at> gmail.com>
To: <bug-gnu-emacs <at> gnu.org>
Cc: okamsn <at> protonmail.com, Stephen Berman <stephen.berman <at> gmx.net>,
 72753 <at> debbugs.gnu.org
Subject: Re: bug#72753: Different output between SBCL `loop` and Emacs
 `cl-loop`
Date: Fri, 23 Aug 2024 13:21:07 +0200
>>>>> On Thu, 22 Aug 2024 09:57:08 +0200, Stephen Berman via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org> said:

    >> 
    >> I don't know what the standard behavior is, but I personally believe
    >> that the SBCL output makes more sense.

    Stephen> FWIW, GNU CLISP 2.49.93+ (built from the git repo) returns 4, not 3, for
    Stephen> the above Common Lisp loop sexp.

The CLHS section 6.1.7.2 says

"The finally construct causes the supplied compound-forms to be
evaluated in the loop epilogue *after* normal iteration terminates."
(emphasis mine).

To me that means all bets are off regarding the values of variables
created in the context of the loop iteration. But we should ask a
Common Lisp expert to be sure.

Robert
-- 




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.