vseloved / rutils

Radical Utilities for Common Lisp
Other
250 stars 37 forks source link

with/bind ignorable variable `_' generates "unused lexical variable" compiler warning #56

Closed mirkov closed 4 years ago

mirkov commented 4 years ago

By way of example,

(rutils:bind (((d _ e &rest f) '(4 0 5 12 13 14 15)))
  (list d e f))

generates

;Compiler warnings :
;   In an anonymous lambda form: Unused lexical variable _

This is on

CL-USER> (lisp-implementation-type)
"Clozure Common Lisp"
CL-USER> (lisp-implementation-version)
"Version 1.11-r16635  (WindowsX8664)"
vseloved commented 4 years ago

Hi, the reason for this is that you haven't imported the _ symbol and it matched the symbol name. I have changed the code to match with string=, which is more ntuitive, I agree.