let-over-lambda icon indicating copy to clipboard operation
let-over-lambda copied to clipboard

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

Open goose121 opened this issue 6 years ago • 0 comments

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.

goose121 avatar Jan 28 '19 04:01 goose121