欢迎!请访问关于页面了解这一工作的更多详细信息。
我认为添加一个可以将标准输出重定向到*err*的宏很有用。
*err*
(with-err-out [& body] `(binding [*out* *err*] ~@body))
反驳:(with-err-out (do-stuff)) 与 (binding [*out* *err*] (do-stuff)) 代码长度并没有明显差异,可读性也没有很大提升。
(with-err-out (do-stuff))
(binding [*out* *err*] (do-stuff))