Closed karlosz closed 10 years ago
I agree that using macros is a good idea for boilerplate code.
However, in the case of the sequence functions, I find that it is impossible to make the macro expansion code readable. That is the main reason I didn't do it that way.
I would much prefer a solution with a few general versions (using completely different algorithms), and then having some code walker replace calls to the test functions and key functions with specialized versions.
Abstract out highly repetitive boilerplate code for many functions in the standard library as well as conditions with macros/macrolets. Cf. CMUCL/SBCL's def macrolets for highly similar functions in the standard library.