Saving CLOS objects

前端 未结 1 1679
情书的邮戳
情书的邮戳 2021-01-23 05:00

Saving any Common Lisp structure object to a file (readably) seems relatively straightforward with something like

(defun save-structure-object (object filename)
         


        
1条回答
  •  囚心锁ツ
    2021-01-23 05:35

    Closer to MOP allows one to avoid the dangerous tangle of read-time conditionals in the post you refer to. Generally speaking, using an OOTB solution that many people use is safer than a random ad hoc hack - your own or someone else's.

    Before closer-mop was around, I wrote my own CLOS/MOP compatibility layer and CLOS object i/o. I suggest that you use it instead of the code in the SO answer you reference.

    0 讨论(0)
提交回复
热议问题