Subject: bug#52063: 28.0.60; Confusing presentation of lambda

From: Lars Ingebrigtsen <[email-masked]>
Date: Thu, 25 Nov 2021 14:09:25 +0100

Michael Heerdegen <[email-masked]> writes:

> Gregory Heytings <[email-masked]> 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