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: Wed, 24 Nov 2021 17:21:43 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

> I'm asking why we are doing this.  IT IS CONFUSING!!!

I think it would be more confusing to have some lambdas be lambdas and
some be closures.  But it would certainly be possible to make the
closures that have no bindings into lambdas again.

Take this example:

(setq foo
      (lambda (a)
        (lambda ()
          (+ a 2))))

(funcall (funcall foo 1))

If we eval-ed `foo' to a lambda here, the funcall would signal an error.

That is, I don't find it confusing -- I find it to be consistent.
Somebody that works in a lexically-bound Lisp has to deal with closures
sooner or later, so special-casing some bits seems counter-productive to
me.  But perhaps others have other opinions here?

-- 
(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]