<div dir="ltr">The dictionary page for *print-readably* says<div><br></div><div>   <span style="color:rgb(0,0,0);font-family:ARIAL,GENEVA,HELVETICA;font-size:medium">Individual </span><i style="color:rgb(0,0,0);font-family:ARIAL,GENEVA,HELVETICA;font-size:medium"><a href="http://franz.com/support/documentation/current/ansicl/glossary/m.htm#method">methods</a></i><span style="color:rgb(0,0,0);font-family:ARIAL,GENEVA,HELVETICA;font-size:medium"> for </span><a href="http://franz.com/support/documentation/current/ansicl/dictentr/print-ob.htm" style="font-family:ARIAL,GENEVA,HELVETICA;font-size:medium"><b>print-object</b></a><span style="color:rgb(0,0,0);font-family:ARIAL,GENEVA,HELVETICA;font-size:medium">, including user-defined </span><i style="color:rgb(0,0,0);font-family:ARIAL,GENEVA,HELVETICA;font-size:medium"><a href="http://franz.com/support/documentation/current/ansicl/glossary/m.htm#method">methods</a></i><span style="color:rgb(0,0,0);font-family:ARIAL,GENEVA,HELVETICA;font-size:medium">, are responsible for implementing these requirements.</span></div><div><span style="color:rgb(0,0,0);font-family:ARIAL,GENEVA,HELVETICA;font-size:medium"><br></span></div><div><span style="color:rgb(0,0,0);font-family:ARIAL,GENEVA,HELVETICA;font-size:medium">so the implementation's applicable print-object method for class condition violates this requirement.</span></div><div><span style="color:rgb(0,0,0);font-family:ARIAL,GENEVA,HELVETICA;font-size:medium"><br></span></div><div><span style="color:rgb(0,0,0);font-family:ARIAL,GENEVA,HELVETICA;font-size:medium">The explanation of *print-readably* </span><span style="color:rgb(0,0,0);font-family:ARIAL,GENEVA,HELVETICA;font-size:medium">unwritten</span><span style="color:rgb(0,0,0);font-family:ARIAL,GENEVA,HELVETICA;font-size:medium"> in the ANS is that it's purpose is to provide a guarantee that something written will later be rereadable without error, producing an object that is the "same" as the original.  (The definition of "same" is a different Lisp execution complicated, but not the central focus here.)  Mostly *print-readably* guarantees that the emitted sequence of character can be reread without signalling error.</span></div><div><span style="color:rgb(0,0,0);font-family:ARIAL,GENEVA,HELVETICA;font-size:medium"><br></span></div><div><span style="color:rgb(0,0,0);font-family:ARIAL,GENEVA,HELVETICA;font-size:medium">All this depends on a bunch of other assumptions, and the necessary details are incomplete in the ANS.  Here are just some of the issues:</span></div><div><span style="color:rgb(0,0,0);font-family:ARIAL,GENEVA,HELVETICA;font-size:medium"><br></span></div><div><span style="color:rgb(0,0,0);font-family:ARIAL,GENEVA,HELVETICA;font-size:medium">What about *print-pretty* and dispatches defined in the current pprint-dispatch?  If there is some such dispatch that would violate rereadability, should the printer ignore that *print-pretty* is true?  A naive reading of the standard suggests this is a requirement (despite being operationally ridiculous) but perhaps the intention was that *print-readably* ought just bind *print-pretty* false.  But if so, the ANS would have said so.</span></div><div><span style="color:rgb(0,0,0);font-family:ARIAL,GENEVA,HELVETICA;font-size:medium"><br></span></div><div><span style="color:rgb(0,0,0);font-family:ARIAL,GENEVA,HELVETICA;font-size:medium">What about other printer variables?  One might define a print-object method that assumes that *print-base* will be the same at reread time -- but the ANS doesn't say this.</span></div><div><span style="color:rgb(0,0,0);font-family:ARIAL,GENEVA,HELVETICA;font-size:medium"><br></span></div><div><span style="color:rgb(0,0,0);font-family:ARIAL,GENEVA,HELVETICA;font-size:medium">Perhaps the ANS missed requiring that *print-readably* can assume the emitted sexpr will be reread inside a with-standard-io-syntax?  But the ANS doesn't say this.</span></div><div><span style="color:rgb(0,0,0);font-family:ARIAL,GENEVA,HELVETICA;font-size:medium"><br></span></div><div><span style="color:rgb(0,0,0);font-family:ARIAL,GENEVA,HELVETICA;font-size:medium">What about the package system?  Whether the printed representation of a symbol has zero, one, or two colons depends on the current state of the package system.  Should *print-readably* assume the package system will be the same at read time?  Perhaps, but the ANS doesn't say this.  And with-standard-io-syntax doesn't help with this.</span></div><div><span style="color:rgb(0,0,0);font-family:ARIAL,GENEVA,HELVETICA;font-size:medium"><br></span></div><div><span style="color:rgb(0,0,0);font-family:ARIAL,GENEVA,HELVETICA;font-size:medium">There are a great many more potential issues.  We must conclude that *print-readably* is only a hook for user code to provide a _weak_ guarantee that no _other_ user code will do things that prevent printed output from being rereadable without likely notification at write time.  But to achieve even this weak guarantee, user code must cooperate with what it knows about the printer and reader.  That it applies to the printer representation of conditions might protect a mostly-numeric output file from containing an unreadable #<floating-point-underflow> object where a float is expected.</span></div><div><span style="color:rgb(0,0,0);font-family:ARIAL,GENEVA,HELVETICA;font-size:medium"><br></span></div><div class="gmail_extra"><br></div></div>