:|temp files|以下代码片段的含义是什么?
(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))))
Run Code Online (Sandbox Code Playgroud)
在Common Lisp中,|...|可用于引用符号名称中的字符; 它可能会逃避通常不允许的字符,例如空格,并且还会禁用大小写转换.
foo或:foo有symbol-name中"FOO"|temp files|或:|temp files|有symbol-name中"temp files"||命名""为空字符串,否则无法生成(这里的冒号具有关键字符号(KEYWORD包中的符号)的通常含义,并且与条形无关.)
|...|当一个任务适合使用符号,而不是根据Common Lisp约定命名的符号时,它很有用.我想在这种情况下,文本"临时文件"出现在程序的输出某处,或用于文件名,或其他一些看起来TEMP-FILES很烦人的情况.