CLHS表示
An attempt to print a circular structure with *print-circle* set
to nil may lead to looping behavior and failure to terminate.然后是这样的:
Why does this Lisp macro as a whole work, even though each piece doesn't work?
显然,将*print-circle*设置为零会带来惊喜。为什么在许多系统上*print-circle*默认设置为nil?如果我从代码一开始就将它设置为全局正确的t,会出现什么问题?
发布于 2013-07-02 23:42:19
如果您将*print-circle*设置为true,那么您的所有输出函数都必须执行周期检查。这意味着它们可能会变慢并占用更多内存。
如果您实际上不使用循环结构(我不是Lisp专家,但我倾向于像躲避瘟疫一样避免它们),我就不会在生产代码中启用循环检查。
https://stackoverflow.com/questions/17429816
复制相似问题