|
From: | Stefan Monnier |
Subject: | bug#8711: 24.0.50; binding _ to unused values with lexical-binding |
Date: | Mon, 23 May 2011 21:56:43 -0300 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
>> 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
[Prev in Thread] | Current Thread | [Next in Thread] |