thephoeron / let-over-lambda

Doug Hoyte's "Production" version of macros from Let Over Lambda, ready for ASDF and Quicklisp.
Other
133 stars 25 forks source link

Function names and quoted symbols lead to unused bindings in defmacro! #18

Open goose121 opened 5 years ago

goose121 commented 5 years ago

If a function name or a symbol in a quoted list in the body of defmacro! starts with g!, then defmacro! will generate a binding to a gensym for it, which will then be unused, leading to a warning from the compiler. The possible solutions I can think of are either to add ignorable declarations in the let statement for the generated symbols, or perhaps to walk through the body statements, finding the symbols which start with g! and defining each of them as symbol macros which append a clause to the let-statement which generates the symbols (perhaps by creating shared list structure in that let-statement using the ,. operator? I'm not sure.) and then returns the g! symbol itself. The second of these seems more "correct" at least to me, but also far more complicated and maybe completely misguided or impossible.