That's pretty rare to see.
#+clim clim:+red+ #-clim mygraphics:+red+
above means that the reader returns either red symbol and it depends whether there is a symbol with the name CLIM is on the list of features *features*
. That's a built-in mechanism in Common Lisp.
#.(cl:if (cl:zerop (cl:random 2)) :high :low)
Above also is a mechanism of the reader. It allows to do computations at read time. Which btw. is a security problem and in Lisp applications it should be disabled - see the variable *read-eval*
for controlling this. At read time the reader using READ will return either :HIGH or :LOW, randomly.
The combination #+#.(FOO) BAR
means that the function foo returns a symbol at read time and this symbol then is checked by the reader if there is a symbol with this name on the feature list *features*
and if that is the case, then the next item in input is read, otherwise the next item is skipped over.
Trivial example, IF always returns :CAPI in this example:
In LispWorks (where CAPI is on the features list):
CL-USER 41 > (read-from-string "#+#.(cl:if cl:t :capi :clim) a b")
A
31
In SBCL
* (read-from-string "#+#.(cl:if cl:t :capi :clim) a b")
B
32
sharp plus
sharp dot
. :) – Septal