GNU bug report logs - #52063
28.0.60; Confusing presentation of lambda

Previous Next

Package: emacs;

Reported by: Eli Zaretskii <eliz <at> gnu.org>

Date: Tue, 23 Nov 2021 18:57:02 UTC

Severity: normal

Found in version 28.0.60

Full log


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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: Gregory Heytings <gregory <at> heytings.org>, fgunbin <at> fastmail.fm,
 Stefan Monnier <monnier <at> iro.umontreal.ca>, 52063 <at> debbugs.gnu.org
Subject: Re: bug#52063: 28.0.60; Confusing presentation of lambda
Date: Thu, 25 Nov 2021 14:09:25 +0100
Michael Heerdegen <michael_heerdegen <at> web.de> writes:

> Gregory Heytings <gregory <at> heytings.org> writes:
>
>> AFAIU, the fundamental question here is: is "(closure (t) args body)"
>> different in any way from "(lambda args body)"?  If not, is there a
>> good reason to use a "(closure (t)" instead of a "(lambda"?
>
> This is my question, too.  But not only: any anonymous function that
> doesn't reference any part of its environment could (?) also be
> represented as a lambda list.  With other words: only "real" closures
> would be represented as (closure ...).  That would make inspection of
> values and things like debugging easier.

A closure has lexical binding inside itself, though, which lambdas do
not have.  So checking for an empty lexical environment isn't sufficient
to decide whether to try to convert back to a lambda or not -- you have
to do some deep inspection.  (See code snippet that demonstrates the
issue in an earlier post of mine.)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 3 years and 254 days ago.

Previous Next


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