What "| ... |" to stand?

What does :|temp files|the following code snippet mean ?

(defmethod acceptor-remove-session ((acceptor my-site-acceptor) (session t))
    (declare (ignore acceptor))
    (loop for path in (session-value :|temp files|)
     do
         (ignore-errors (delete-file path))))
+5
source share
3 answers

In Common Lisp, |...|can be used to quote characters in a character name; it can avoid commonly forbidden characters, such as spaces, and also disables case conversion.

  • fooor :foohave symbol-nameof"FOO"
  • |temp files|or :|temp files|have symbol-nameof"temp files"
  • ||has a name "", an empty string that otherwise cannot be created

(The colon here has the usual meaning of a keyword symbol (a character in a packet KEYWORD) and is column independent.)

|...| , , Lisp. , " " , TEMP-FILES .

+9

| escape Lisp:

? 'aaBBcc|DDeeFFgg|hhII|jjKK|LL

-> |AABBCCDDeeFFggHHIIjjKKLL|

. .

+4

Lisp , ? %, . , - , , , |temp files| OP. (|). , -, , , .

+3
source

All Articles