GNU bug report logs - #8711
24.0.50; binding _ to unused values with lexical-binding

Previous Next

Package: emacs;

Reported by: Helmut Eller <eller.helmut <at> gmail.com>

Date: Sat, 21 May 2011 18:45:02 UTC

Severity: minor

Found in versions 24.0.50, 26.0.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Helmut Eller <eller.helmut <at> gmail.com>
Cc: 8711 <at> debbugs.gnu.org
Subject: bug#8711: 24.0.50; binding _ to unused values with lexical-binding
Date: Mon, 23 May 2011 21:56:43 -0300
>> It can insert (ignore nil) instead which should have the same effect but
>> without triggering the other warning with lexical-binding.

> Indeed.  But I quickly run into another case where that doesn't help:

> (defun foo (x) (destructuring-bind (y &rest _) x y))

I don't see any warning for this code.  What warning do you get?

> The semantic of loop (in Common Lisp) allows both variants. So the
> "portable" idiom is "collect (let ((value value)) (lambda () value))".

Interesting.  I didn't think they'd accept the alternate semantic, which
is clearly less useful and less efficient at the same time (tho maybe
there are implementation strategies that may not make it that much less
efficient).


        Stefan






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

Previous Next


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