ruricolist / spinneret

Common Lisp HTML5 generator
MIT License
369 stars 26 forks source link

There are some unused imports from serapeum #26

Closed PuercoPop closed 6 years ago

PuercoPop commented 6 years ago
ruricolist commented 6 years ago

I've removed these, but if you don't mind me asking, how did you come to discover them?

PuercoPop commented 6 years ago

I was looking for examples of how functions of Serapeum were used and the coincidentally first one I searched for, unsplice, was unused so I checked for others.

Incidentally I wanted to ask to you about unsplice, Although the extra wrapping parens about the code are not exactly tasteful is the extra nesting to do away with extra parens more tasteful? Even though I dislike boilerplate in Lisp, at least the pattern ,@(when …) is easy to recognize. I know that the word 'tasteful' is subjective but still I'm curious to know why/if you prefer unsplice.

ruricolist commented 6 years ago

I think unsplice is a clear improvement when you’re splicing in a variable:

,@(and docstring `(,docstring))
,@(unsplice docstring)

It’s not as compelling where there’s an explicit condition, but I still prefer it. I think of it as future-proofing: there’s less danger of introducing a bug if I come back later and edit the code. Especially if there’s more than one branch.