Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion How do you print readably?
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Richard M Kreuter  
View profile  
 More options Mar 7 2007, 1:03 pm
Newsgroups: comp.lang.lisp
From: Richard M Kreuter <kreu...@progn.net>
Date: Wed, 07 Mar 2007 13:03:26 -0500
Local: Wed, Mar 7 2007 1:03 pm
Subject: Re: How do you print readably?

Tim Bradshaw <t...@tfeb.org> writes:
> On 2007-03-06 14:05:59 +0000, Richard M Kreuter <kreu...@progn.net> said:

>> If the PRINT emits output with a custom read macro, then the READ will
>> error, since WITH-STANDARD-IO-SYNTAX uses the standard readtable.

> Yes. If you want a special readtable in place but otherwise want to be
> assured of standard syntax you need to put stuff inside
> WITH-STANDARD-IO-SYNTAX to make that be the case.

Well sure, you can use WITH-STANDARD-IO-SYNTAX as a base on which to
build custom I/O syntaxes.  

I was looking that the examples in the WITH-STANDARD-IO-SYNTAX
dictionary entry as constraints on what PRINT-OBJECT methods can do,
since the examples won't work in general if PRINT-OBJECT methods can
emit arbitrary output,

Now that I look at it, the dictionary entry for *PRINT-READABLY* is
clear enough on its own:

| If ‘*print-readably*’ is true, some special rules for printing
| objects go into effect.  Specifically, printing any object O₁
| produces a printed representation that, when seen by the Lisp reader
| while the standard readtable is in effect, will produce an object O₂
| that is similar to O₁.

So a PRINT-OBJECT method /must not/ emit anything unreadable in the
standard syntax when *PRINT-READABLY* is true.  Provided that all
methods PRINT-OBJECT conform to this protocol WITH-STANDARD-IO-SYNTAX
turns out to be reliable, after all.

--
RmK


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.