1
0
Fork 0
cl-sites/HyperSpec-7-0/HyperSpec/Issues/iss140_w.htm
2024-04-01 10:24:07 +02:00

108 lines
7.4 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 DRIBBLE-TECHNIQUE 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/iss139_w.htm">
<LINK REL=UP HREF="../Issues/iss140.htm">
<LINK REL=NEXT HREF="../Issues/iss141_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/iss139_w.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Previous]" SRC="../Graphics/Prev.gif" ALIGN=Bottom></A><A REL=UP HREF="../Issues/iss140.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Up]" SRC="../Graphics/Up.gif" ALIGN=Bottom></A><A REL=NEXT HREF="../Issues/iss141_w.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Next]" SRC="../Graphics/Next.gif" ALIGN=Bottom></A></H1>
<HR>
<H2>Issue DRIBBLE-TECHNIQUE Writeup</H2>
<PRE><B>Issue:</B> <A HREF="iss140.htm">DRIBBLE-TECHNIQUE</A><P>
<B>References:</B> <A REL=DEFINITION HREF="../Body/f_dribbl.htm#dribble"><B>DRIBBLE</B></A> (p443)<P>
<B>Category:</B> CLARIFICATION<P>
<B>Edit history:</B> 06-Dec-87, Version 1 by Pitman<P>
14-Feb-88, Version 2 by Masinter<P>
<P>
<B>Problem Description:<P>
</B><P>
The intent and effect of <A REL=DEFINITION HREF="../Body/f_dribbl.htm#dribble"><B>DRIBBLE</B></A> is not very clearly specified. Users have<P>
complained that <A REL=DEFINITION HREF="../Body/f_dribbl.htm#dribble"><B>DRIBBLE</B></A> behaves quite differently in different implementations.<P>
<P>
<B>Proposal (DRIBBLE-TECHNIQUE:MAKE-EXPLICITLY-VAGUE):<P>
</B><P>
Clarify that <A REL=DEFINITION HREF="../Body/f_dribbl.htm#dribble"><B>DRIBBLE</B></A> is intended primarily for interactive debugging and that<P>
its effect cannot be relied upon from programs.<P>
<P>
<B>Test Case:<P>
</B><P>
#1: (<A REL=DEFINITION HREF="../Body/s_progn.htm#progn"><B>PROGN</B></A> (<A REL=DEFINITION HREF="../Body/f_dribbl.htm#dribble"><B>DRIBBLE</B></A> &quot;temp&quot;)<P>
(<A REL=DEFINITION HREF="../Body/f_wr_pr.htm#print"><B>PRINT</B></A> 'FOO)<P>
(<A REL=DEFINITION HREF="../Body/f_dribbl.htm#dribble"><B>DRIBBLE</B></A>))<P>
<P>
#2: (<A REL=DEFINITION HREF="../Body/f_dribbl.htm#dribble"><B>DRIBBLE</B></A> &quot;temp&quot;)<P>
(<A REL=DEFINITION HREF="../Body/s_progn.htm#progn"><B>PROGN</B></A> (<A REL=DEFINITION HREF="../Body/f_wr_pr.htm#print"><B>PRINT</B></A> 'FOO)<P>
(<A REL=DEFINITION HREF="../Body/f_dribbl.htm#dribble"><B>DRIBBLE</B></A>)<P>
(<A REL=DEFINITION HREF="../Body/f_wr_pr.htm#princ"><B>PRINC</B></A> 'BAR)) <P>
<P>
<B>Rationale:<P>
</B><P>
Users of <A REL=DEFINITION HREF="../Body/f_dribbl.htm#dribble"><B>DRIBBLE</B></A> have been surprised about how differently <A REL=DEFINITION HREF="../Body/f_dribbl.htm#dribble"><B>DRIBBLE</B></A> behaves in<P>
different implementations. This makes the status quo much more explicit and will<P>
lead to less surprise.<P>
<P>
<B>Current Practice:<P>
</B><P>
Some implementations implement <A REL=DEFINITION HREF="../Body/f_dribbl.htm#dribble"><B>DRIBBLE</B></A> as a function which simply assigns<P>
streams such as <A REL=DEFINITION HREF="../Body/v_debug_.htm#STstandard-outputST"><B>*STANDARD-OUTPUT*</B></A> to broadcast streams (or the approximate<P>
equivalent thereof). Even within this camp, there is not widespread agreement<P>
about which streams are affected. However, typically test case #1 will capture<P>
the output of (<A REL=DEFINITION HREF="../Body/f_wr_pr.htm#print"><B>PRINT</B></A> 'FOO) in the file &quot;temp&quot; and will execute (<A REL=DEFINITION HREF="../Body/f_wr_pr.htm#print"><B>PRINT</B></A> 'BAR) but<P>
not capture its output.<P>
<P>
Some implementations (eg, Symbolics) push to a recursive command loop when<P>
<A REL=DEFINITION HREF="../Body/f_dribbl.htm#dribble"><B>DRIBBLE</B></A> is called with an argument, and return from that command loop when<P>
<A REL=DEFINITION HREF="../Body/f_dribbl.htm#dribble"><B>DRIBBLE</B></A> is called with no argument. In these implementations, test case #1 will<P>
enter a recursive command loop upon the first call to <A REL=DEFINITION HREF="../Body/f_dribbl.htm#dribble"><B>DRIBBLE</B></A> and will not<P>
execute the (<A REL=DEFINITION HREF="../Body/f_wr_pr.htm#print"><B>PRINT</B></A> 'FOO) until (<A REL=DEFINITION HREF="../Body/f_dribbl.htm#dribble"><B>DRIBBLE</B></A>) is done interactively. When the second<P>
(<A REL=DEFINITION HREF="../Body/f_dribbl.htm#dribble"><B>DRIBBLE</B></A>) in test case #1 is executed, <A REL=DEFINITION HREF="../Body/f_dribbl.htm#dribble"><B>DRIBBLE</B></A> will complain that output is not<P>
currently being recorded. In test case #2, the output of (<A REL=DEFINITION HREF="../Body/f_wr_pr.htm#print"><B>PRINT</B></A> 'FOO) will be<P>
captured, but the form (<A REL=DEFINITION HREF="../Body/f_wr_pr.htm#print"><B>PRINT</B></A> 'BAR) will never be executed because (<A REL=DEFINITION HREF="../Body/f_dribbl.htm#dribble"><B>DRIBBLE</B></A>)<P>
does not return normally (it throws).<P>
<P>
<B>Cost to implementors:<P>
</B><P>
None. This is just a clarification.<P>
<P>
<B>Cost to users:<P>
</B><P>
Anyone who currently uses <A REL=DEFINITION HREF="../Body/f_dribbl.htm#dribble"><B>DRIBBLE</B></A> in code that is believed to be portable is<P>
kidding himself. If such code works in some implementations, it can continue to<P>
work.<P>
<P>
<B>Benefits:<P>
</B><P>
Users will be aware that they cannot rely on <A REL=DEFINITION HREF="../Body/f_dribbl.htm#dribble"><B>DRIBBLE</B></A> in portable code.<P>
<P>
<B>Aesthetics:<P>
</B><P>
No apparent effect.<P>
<P>
<B>Discussion:<P>
</B><P>
<A REL=DEFINITION HREF="../Body/f_dribbl.htm#dribble"><B>DRIBBLE</B></A>, like other environment features, is a <A REL=DEFINITION HREF="../Body/07_ffb.htm#standard"><B>standard</B></A> interface to a<P>
non-standard feature. As such, there is some question as to its place in the<P>
ANSI <A REL=DEFINITION HREF="../Body/07_ffb.htm#standard"><B>standard</B></A>. However, if <A REL=DEFINITION HREF="../Body/f_dribbl.htm#dribble"><B>DRIBBLE</B></A> remains in the <A REL=DEFINITION HREF="../Body/07_ffb.htm#standard"><B>standard</B></A>, its behavior is made<P>
explicitly vague by this proposal.<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>