GNU bug report logs - #748
Elisp: lexical-let and cyclic structures

Previous Next

Package: emacs;

Reported by: michael_heerdegen <at> web.de

Date: Wed, 20 Aug 2008 14:05:05 UTC

Severity: normal

Tags: wontfix

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Glenn Morris <rgm <at> gnu.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#748: closed (Elisp: lexical-let and cyclic structures)
Date: Sat, 09 Jul 2011 17:52:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sat, 09 Jul 2011 13:51:43 -0400
with message-id <hypqlj7368.fsf <at> fencepost.gnu.org>
and subject line Re: bug#748: Elisp: lexical-let and cyclic structures
has caused the GNU bug report #748,
regarding Elisp: lexical-let and cyclic structures
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
748: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=748
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: emacs-pretest-bug <at> gnu.org
Subject: Elisp: lexical-let and cyclic structures
Date: Wed, 20 Aug 2008 15:57:16 +0200
When using the reader constructs `#N=' and `#N#' for cyclic
structures, lexical-let sometimes produces errors which don't occur
with let.

Example: Eval the following:

(defun f (start)
  (lexical-let (start start)         ;; return a closure
    #1=(lambda (x) (if (= x start) x
		     (+ x (#1# (1- x)))))))

Then evaluating f ends with an error:

   (f 3)

    "Variable binding depth exceeds max-specpdl-size"


The problem also occurs without lambdas. Examples:

   (let         () '#1=(#1#))               ;; ==> (#0)
   (lexical-let () '#1=(#1#))               ;;  Error
   (let ((x '#1=(#1#))) (lexical-let () x)) ;; ==> (#0)
   `#1=(#1#)                                ;;  Error


[Message part 3 (message/rfc822, inline)]
From: Glenn Morris <rgm <at> gnu.org>
To: 748-done <at> debbugs.gnu.org
Subject: Re: bug#748: Elisp: lexical-let and cyclic structures
Date: Sat, 09 Jul 2011 13:51:43 -0400
I don't see a need to keep open this particular report, which was marked
"wontfix" some time ago.

Stefan Monnier wrote:

> Most programming languages do not accept infinite programs.  Elisp is
> no exception.  The fact that you can build cyclic abstract syntax trees
> and that they sometimes get evaluated correctly is just an accident.
>
> I.e. if it hurts, don't do it.


This bug report was last modified 13 years and 317 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.