bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#52063: 28.0.60; Confusing presentation of lambda


From: Lars Ingebrigtsen
Subject: bug#52063: 28.0.60; Confusing presentation of lambda
Date: Thu, 25 Nov 2021 14:09:25 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Michael Heerdegen <michael_heerdegen@web.de> writes:

> Gregory Heytings <gregory@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





reply via email to

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