If you want to make CLOS objects in common lisp printable (print readably), how do you go about doing this without using anything but print and read.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There are two parts to doing this, at least in my solution, however you will need this function (thanks to the guys at cl-prevalence for this (warn LLGPL)
Then, for reading you will need to run this piece of code, which sets up 1/2 of the syntax which is
{ type-of-object ((slot-name . slot-value) (slot-name . slot-value) ...)For printing, use
A
*print-readably*is highly recommended when using all these methods. Also, note that circular relationships are untested