120 lines
5.9 KiB
HTML
120 lines
5.9 KiB
HTML
<!-- Common Lisp HyperSpec (TM), version 7.0 generated by Kent M. Pitman on Mon, 11-Apr-2005 2:31am EDT -->
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE>CLHS: Issue PRINTER-WHITESPACE Writeup</TITLE>
|
|
<LINK HREF="../Data/clhs.css" REL="stylesheet" TYPE="text/css" />
|
|
<META HTTP-EQUIV="Author" CONTENT="Kent M. Pitman">
|
|
<META HTTP-EQUIV="Organization" CONTENT="LispWorks Ltd.">
|
|
<LINK REL=TOP HREF="../Front/index.htm">
|
|
<LINK REL=COPYRIGHT HREF="../Front/Help.htm#Legal">
|
|
<LINK REL=DISCLAIMER HREF="../Front/Help.htm#Disclaimer">
|
|
<LINK REL=PREV HREF="../Issues/iss276_w.htm">
|
|
<LINK REL=UP HREF="../Issues/iss277.htm">
|
|
<LINK REL=NEXT HREF="../Issues/iss278_w.htm">
|
|
</HEAD>
|
|
<BODY>
|
|
<H1><A REV=MADE HREF="http://www.lispworks.com/"><IMG WIDTH=80 HEIGHT=65 ALT="[LISPWORKS]" SRC="../Graphics/LWSmall.gif" ALIGN=Bottom></A><A REL=TOP HREF="../Front/index.htm"><IMG WIDTH=237 HEIGHT=65 ALT="[Common Lisp HyperSpec (TM)]" SRC="../Graphics/CLHS_Sm.gif" ALIGN=Bottom></A> <A REL=PREV HREF="../Issues/iss276_w.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Previous]" SRC="../Graphics/Prev.gif" ALIGN=Bottom></A><A REL=UP HREF="../Issues/iss277.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Up]" SRC="../Graphics/Up.gif" ALIGN=Bottom></A><A REL=NEXT HREF="../Issues/iss278_w.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Next]" SRC="../Graphics/Next.gif" ALIGN=Bottom></A></H1>
|
|
|
|
<HR>
|
|
|
|
|
|
|
|
<H2>Issue PRINTER-WHITESPACE Writeup</H2>
|
|
|
|
<PRE><B>Issue:</B> <A HREF="iss277.htm">PRINTER-WHITESPACE</A><P>
|
|
<B>Forum:</B> X3J13 Letter Ballot<P>
|
|
<B>References:</B> 22.1.3.8 (pp22-7..22-8),<P>
|
|
22.1.3.10 (p22-9)<P>
|
|
<B>Category:</B> CLARIFICATION<P>
|
|
<B>Edit history:</B> 16-Jun-93, Version 1 by Pitman<P>
|
|
<B>Status:</B> Proposal JUST-ONE-SPACE passed (7+1)-3 on letter ballot 93-304<P>
|
|
<P>
|
|
<P>
|
|
<B>Problem Description:<P>
|
|
</B><P>
|
|
In the descriptions of how lists and vectors print, the draft <P>
|
|
<A REL=DEFINITION HREF="../Body/07_ffb.htm#standard"><B>standard</B></A> says "whitespace" is printed where CLtL1 says "a space".<P>
|
|
Is this an unintentional change?<P>
|
|
<P>
|
|
<B>Proposal (PRINTER-WHITESPACE:JUST-ONE-SPACE):<P>
|
|
</B><P>
|
|
When *print-pretty* is false, <A REL=DEFINITION HREF="../Body/f_provid.htm#require"><B>require</B></A> the printer to use exactly<P>
|
|
one space in the indicated situations. In general, when *print-pretty*<P>
|
|
is false, recommend that implementations and users output a minimum<P>
|
|
of space in this situation. [This is status quo under CLtL1]<P>
|
|
<P>
|
|
Rationale: This forces implementations to use very little space<P>
|
|
and makes printer behavior more regular across implementations.<P>
|
|
<P>
|
|
<B>Proposal (PRINTER-WHITESPACE:WHITESPACE):<P>
|
|
</B><P>
|
|
Affirm that where the printer is defined to output whitespace,<P>
|
|
arbitrary whitespace is permissible. Recommend that implementations<P>
|
|
and users use a minum of whitespace when *print-pretty* is false,<P>
|
|
but permit flexibility. [This is status quo under dpANS]<P>
|
|
<P>
|
|
Rationale: This makes it less likely that users will write code<P>
|
|
that is not robust in the face of varying amounts of <P>
|
|
whitespace inserted by entities other than the printer<P>
|
|
(e.g., a human being).<P>
|
|
<P>
|
|
<B>Test Cases:<P>
|
|
</B><P>
|
|
#1: (<A REL=DEFINITION HREF="../Body/f_char_.htm#char"><B>CHAR</B></A> (<A REL=DEFINITION HREF="../Body/f_format.htm#format"><B>FORMAT</B></A> <A REL=DEFINITION HREF="../Body/a_nil.htm#nil"><B>NIL</B></A> "~S" '(A B)) 2)<P>
|
|
might return #\Space in some implementations and #\Newline in others.<P>
|
|
<P>
|
|
#2: (<A REL=DEFINITION HREF="../Body/f_char_.htm#char"><B>CHAR</B></A> (<A REL=DEFINITION HREF="../Body/f_format.htm#format"><B>FORMAT</B></A> <A REL=DEFINITION HREF="../Body/a_nil.htm#nil"><B>NIL</B></A> "~S" '(A B)) 3)<P>
|
|
might return #\Space in some implementations and #\B in others.<P>
|
|
<P>
|
|
#3: (<A REL=DEFINITION HREF="../Body/f_length.htm#length"><B>LENGTH</B></A> (<A REL=DEFINITION HREF="../Body/f_format.htm#format"><B>FORMAT</B></A> <A REL=DEFINITION HREF="../Body/a_nil.htm#nil"><B>NIL</B></A> "~S" '(A B)))<P>
|
|
might return 5 in some implementations or greater numbers in others.<P>
|
|
<P>
|
|
<B>Current Practice:<P>
|
|
</B><P>
|
|
Not provided.<P>
|
|
<P>
|
|
<B>Cost to Implementors:<P>
|
|
</B><P>
|
|
JUST-ONE-SPACE: Relatively small.<P>
|
|
WHITESPACE: None. (status quo)<P>
|
|
<P>
|
|
<B>Cost to Users:<P>
|
|
</B><P>
|
|
JUST-ONE-SPACE: None.<P>
|
|
WHITESPACE: None. (status quo)<P>
|
|
<P>
|
|
<B>Cost of Non-Adoption:<P>
|
|
</B><P>
|
|
See Rationale above.<P>
|
|
<P>
|
|
<B>Benefits:<P>
|
|
</B><P>
|
|
See above.<P>
|
|
<P>
|
|
<B>Editorial Impact:<P>
|
|
</B><P>
|
|
Small.<P>
|
|
<P>
|
|
<B>Aesthetics:<P>
|
|
</B><P>
|
|
Some people might quibble a little, but mostly pretty neutral.<P>
|
|
<P>
|
|
<B>Discussion:<P>
|
|
</B><P>
|
|
This is in response to Public Review comment Loosemore #15.<P>
|
|
<P>
|
|
Pitman prefers option WHITESPACE.<P>
|
|
<P>
|
|
Pitman believes the complained-about change occurred during <P>
|
|
the integration of the pretty printer description with the <P>
|
|
printer chapter. At Waters' direction, he allowed this change <P>
|
|
to be taken as editorial--probably a bad idea in retrospect.<P>
|
|
<P>
|
|
</PRE>
|
|
<HR>
|
|
|
|
<A REL=NAVIGATOR HREF="../Front/StartPts.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Starting Points]" SRC="../Graphics/StartPts.gif" ALIGN=Bottom></A><A REL=TOC HREF="../Front/Contents.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Contents]" SRC="../Graphics/Contents.gif" ALIGN=Bottom></A><A REL=INDEX HREF="../Front/X_Master.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Index]" SRC="../Graphics/Index.gif" ALIGN=Bottom></A><A REL=INDEX HREF="../Front/X_Symbol.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Symbols]" SRC="../Graphics/Symbols.gif" ALIGN=Bottom></A><A REL=GLOSSARY HREF="../Body/26_a.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Glossary]" SRC="../Graphics/Glossary.gif" ALIGN=Bottom></A><A HREF="../Front/X3J13Iss.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Issues]" SRC="../Graphics/Issues.gif" ALIGN=Bottom></A><BR>
|
|
|
|
<A REL=COPYRIGHT HREF="../Front/Help.htm#Legal"><I>Copyright 1996-2005, LispWorks Ltd. All rights reserved.</I></A><P>
|
|
</BODY>
|
|
</HTML>
|