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 #26 received at 52063 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 52063 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca
Subject: Re: bug#52063: 28.0.60; Confusing presentation of lambda
Date: Wed, 24 Nov 2021 17:21:43 +0100
Eli Zaretskii <eliz <at> 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




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.