205 lines
12 KiB
HTML
205 lines
12 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 DESCRIBE-INTERACTIVE 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/iss126_w.htm">
|
|
<LINK REL=UP HREF="../Issues/iss127.htm">
|
|
<LINK REL=NEXT HREF="../Issues/iss128_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/iss126_w.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Previous]" SRC="../Graphics/Prev.gif" ALIGN=Bottom></A><A REL=UP HREF="../Issues/iss127.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Up]" SRC="../Graphics/Up.gif" ALIGN=Bottom></A><A REL=NEXT HREF="../Issues/iss128_w.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Next]" SRC="../Graphics/Next.gif" ALIGN=Bottom></A></H1>
|
|
|
|
<HR>
|
|
|
|
|
|
|
|
<H2>Issue DESCRIBE-INTERACTIVE Writeup</H2>
|
|
|
|
<PRE><B>Status:</B> Proposal NO passed Jan 89 X3J13<P>
|
|
<B>Issue:</B> <A HREF="iss127.htm">DESCRIBE-INTERACTIVE</A><P>
|
|
<B>References:</B> <A REL=DEFINITION HREF="../Body/f_descri.htm#describe"><B>DESCRIBE</B></A> (p441)<P>
|
|
<B>Category:</B> CLARIFICATION (EXPLICITLY-VAGUE) / CHANGE (NO)<P>
|
|
<B>Edit history:</B> 12-Sep-88, Version 1 by Pitman<P>
|
|
23-Sep-88, Version 2 by Masinter<P>
|
|
19-Oct-88, Version 3 by Pierson, invert<P>
|
|
15-Nov-88, Version 4 by Pierson, two-proposal version<P>
|
|
<P>
|
|
<B>Problem Description:<P>
|
|
</B><P>
|
|
CLtL is not clear about whether <A REL=DEFINITION HREF="../Body/f_descri.htm#describe"><B>DESCRIBE</B></A> may be interactive.<P>
|
|
While CLtL describes <A REL=DEFINITION HREF="../Body/f_inspec.htm#inspect"><B>INSPECT</B></A> as an interactive as an<P>
|
|
interactive version of <A REL=DEFINITION HREF="../Body/f_descri.htm#describe"><B>DESCRIBE</B></A>, it doesn't make explicit<P>
|
|
that <A REL=DEFINITION HREF="../Body/f_descri.htm#describe"><B>DESCRIBE</B></A> is non-interactive. In some implementations it is, <P>
|
|
and in other implementations it is not.<P>
|
|
<P>
|
|
Users of systems in which <A REL=DEFINITION HREF="../Body/f_descri.htm#describe"><B>DESCRIBE</B></A> is not interactive may presume<P>
|
|
that it is safe to call <A REL=DEFINITION HREF="../Body/f_descri.htm#describe"><B>DESCRIBE</B></A> in a batch applications without<P>
|
|
hanging the application, which can lead to problems.<P>
|
|
<P>
|
|
<B>Proposal (DESCRIBE-INTERACTIVE:EXPLICITLY-VAGUE):<P>
|
|
</B><P>
|
|
Specify that <A REL=DEFINITION HREF="../Body/f_descri.htm#describe"><B>DESCRIBE</B></A> is permitted (though not required) to<P>
|
|
<A REL=DEFINITION HREF="../Body/f_provid.htm#require"><B>require</B></A> user input, and that such input should be negotiated<P>
|
|
through <A REL=DEFINITION HREF="../Body/v_debug_.htm#STquery-ioST"><B>*QUERY-IO*</B></A>.<P>
|
|
<P>
|
|
Descriptive information would continue to go to <A REL=DEFINITION HREF="../Body/v_debug_.htm#STstandard-outputST"><B>*STANDARD-OUTPUT*</B></A>.<P>
|
|
<P>
|
|
Test Case:<P>
|
|
<P>
|
|
The following kind of interaction would be permissible in<P>
|
|
implementations which chose to do it:<P>
|
|
<P>
|
|
(<A REL=DEFINITION HREF="../Body/m_defpar.htm#defvar"><B>DEFVAR</B></A> *MY-TABLE* (<A REL=DEFINITION HREF="../Body/f_mk_has.htm#make-hash-table"><B>MAKE-HASH-TABLE</B></A>))<P>
|
|
(<A REL=DEFINITION HREF="../Body/a_setf.htm#setf"><B>SETF</B></A> (<A REL=DEFINITION HREF="../Body/f_gethas.htm#gethash"><B>GETHASH</B></A> 'FOO *MY-TABLE*) 1)<P>
|
|
(<A REL=DEFINITION HREF="../Body/a_setf.htm#setf"><B>SETF</B></A> (<A REL=DEFINITION HREF="../Body/f_gethas.htm#gethash"><B>GETHASH</B></A> 'BAR *MY-TABLE*) 2)<P>
|
|
(<A REL=DEFINITION HREF="../Body/a_setf.htm#setf"><B>SETF</B></A> (<A REL=DEFINITION HREF="../Body/f_gethas.htm#gethash"><B>GETHASH</B></A> 'FOOBAR *MY-TABLE*) 3)<P>
|
|
(<A REL=DEFINITION HREF="../Body/f_descri.htm#describe"><B>DESCRIBE</B></A> *MY-TABLE*)<P>
|
|
#<EQ-HASH-TABLE 259> has 3 entries.<P>
|
|
Do you want to see its contents? (Yes or No) Yes<P>
|
|
<P>
|
|
Rationale:<P>
|
|
<P>
|
|
This validates current implementations.<P>
|
|
<P>
|
|
Current Practice:<P>
|
|
<P>
|
|
Symbolics Genera asks some questions interactively when describing<P>
|
|
some kinds of structured data structures, such as hash tables.<P>
|
|
Since users can define their own <A REL=DEFINITION HREF="../Body/f_descri.htm#describe"><B>DESCRIBE</B></A> methods and took their cue<P>
|
|
from the system, describing some user structures also <A REL=DEFINITION HREF="../Body/f_provid.htm#require"><B>require</B></A> such<P>
|
|
interactions.<P>
|
|
<P>
|
|
Cost to Implementors:<P>
|
|
<P>
|
|
None.<P>
|
|
<P>
|
|
Cost to Users:<P>
|
|
<P>
|
|
User code which depended on <A REL=DEFINITION HREF="../Body/f_descri.htm#describe"><B>DESCRIBE</B></A> running without user interaction<P>
|
|
would have to be modified. Such code is not currently fully portable,<P>
|
|
however.<P>
|
|
<P>
|
|
Cost of Non-Adoption:<P>
|
|
<P>
|
|
Users would not know the straight story about whether they should<P>
|
|
expect interaction from <A REL=DEFINITION HREF="../Body/f_descri.htm#describe"><B>DESCRIBE</B></A>.<P>
|
|
<P>
|
|
Benefits:<P>
|
|
<P>
|
|
Implementations which don't do interactive querying in <A REL=DEFINITION HREF="../Body/f_descri.htm#describe"><B>DESCRIBE</B></A> only<P>
|
|
because they're not 100% sure it's kosher would be free to do it.<P>
|
|
<P>
|
|
Aesthetics:<P>
|
|
<P>
|
|
Some people might think it's not aesthetic for <A REL=DEFINITION HREF="../Body/f_descri.htm#describe"><B>DESCRIBE</B></A> to <A REL=DEFINITION HREF="../Body/f_provid.htm#require"><B>require</B></A> user<P>
|
|
intervention. Not saying whether it's permissible is probably less<P>
|
|
aesthetic, though.<P>
|
|
<P>
|
|
<B>Proposal (DESCRIBE-INTERACTIVE:NO):<P>
|
|
</B><P>
|
|
Specify that <A REL=DEFINITION HREF="../Body/f_descri.htm#describe"><B>DESCRIBE</B></A> is forbidden to prompt for or <A REL=DEFINITION HREF="../Body/f_provid.htm#require"><B>require</B></A><P>
|
|
user input. Permit implementations to extend describe via keyword<P>
|
|
arguments to prompt for or <A REL=DEFINITION HREF="../Body/f_provid.htm#require"><B>require</B></A> user input as long as the default<P>
|
|
action if no keyword arguments are supplied does not prompt for or<P>
|
|
<A REL=DEFINITION HREF="../Body/f_provid.htm#require"><B>require</B></A> user input.<P>
|
|
<P>
|
|
This is an incompatible change for some implementations.<P>
|
|
<P>
|
|
Test Case:<P>
|
|
<P>
|
|
The following kind of interaction would be permissible in<P>
|
|
implementations which chose to do it:<P>
|
|
<P>
|
|
(<A REL=DEFINITION HREF="../Body/m_defpar.htm#defvar"><B>DEFVAR</B></A> *MY-TABLE* (<A REL=DEFINITION HREF="../Body/f_mk_has.htm#make-hash-table"><B>MAKE-HASH-TABLE</B></A>))<P>
|
|
(<A REL=DEFINITION HREF="../Body/a_setf.htm#setf"><B>SETF</B></A> (<A REL=DEFINITION HREF="../Body/f_gethas.htm#gethash"><B>GETHASH</B></A> 'FOO *MY-TABLE*) 1)<P>
|
|
(<A REL=DEFINITION HREF="../Body/a_setf.htm#setf"><B>SETF</B></A> (<A REL=DEFINITION HREF="../Body/f_gethas.htm#gethash"><B>GETHASH</B></A> 'BAR *MY-TABLE*) 2)<P>
|
|
(<A REL=DEFINITION HREF="../Body/a_setf.htm#setf"><B>SETF</B></A> (<A REL=DEFINITION HREF="../Body/f_gethas.htm#gethash"><B>GETHASH</B></A> 'FOOBAR *MY-TABLE*) 3)<P>
|
|
(<A REL=DEFINITION HREF="../Body/f_descri.htm#describe"><B>DESCRIBE</B></A> *MY-TABLE* :INTERACTIVE T)<P>
|
|
#<EQ-HASH-TABLE 259> has 3 entries.<P>
|
|
Do you want to see its contents? (Yes or No) Yes<P>
|
|
<P>
|
|
Rationale:<P>
|
|
<P>
|
|
<A REL=DEFINITION HREF="../Body/f_descri.htm#describe"><B>DESCRIBE</B></A> is the only hook a portable program has for providing<P>
|
|
information about objects to the user. The potential interactive<P>
|
|
functions of <A REL=DEFINITION HREF="../Body/f_descri.htm#describe"><B>DESCRIBE</B></A> are also likely to be available via <A REL=DEFINITION HREF="../Body/f_inspec.htm#inspect"><B>INSPECT</B></A>.<P>
|
|
<P>
|
|
Current Practice:<P>
|
|
<P>
|
|
Symbolics Genera asks some questions interactively when describing<P>
|
|
some kinds of structured data structures, such as hash tables.<P>
|
|
Since users can define their own <A REL=DEFINITION HREF="../Body/f_descri.htm#describe"><B>DESCRIBE</B></A> methods and took their cue<P>
|
|
from the system, describing some user structures also <A REL=DEFINITION HREF="../Body/f_provid.htm#require"><B>require</B></A> such<P>
|
|
interactions.<P>
|
|
<P>
|
|
Cost to Implementors:<P>
|
|
<P>
|
|
Symbolics Genera and other non-conforming implementations will have<P>
|
|
to change.<P>
|
|
<P>
|
|
Cost to Users:<P>
|
|
<P>
|
|
User code which depends on <A REL=DEFINITION HREF="../Body/f_descri.htm#describe"><B>DESCRIBE</B></A> running with user interaction<P>
|
|
will have to be modified. Such code is not currently portable,<P>
|
|
however.<P>
|
|
<P>
|
|
Cost of Non-Adoption:<P>
|
|
<P>
|
|
Users would not have any portable way to have progams inform the<P>
|
|
user about object they are dealing with. This might be important in<P>
|
|
traces and logs of portable progams or in portable debugging tools.<P>
|
|
<P>
|
|
Benefits:<P>
|
|
<P>
|
|
It will be easier to <A REL=DEFINITION HREF="../Body/f_provid.htm#provide"><B>provide</B></A> some types of portable functionality.<P>
|
|
<P>
|
|
Aesthetics:<P>
|
|
<P>
|
|
This simplifies the language slightly.<P>
|
|
<P>
|
|
<B>Discussion:<P>
|
|
</B><P>
|
|
Pitman thinks it's important to clarify this issue, but he isn't fussy<P>
|
|
about the particulars.<P>
|
|
<P>
|
|
EXPLICITY-VAGUE proposal is the minimal proposal for compatibility<P>
|
|
with current behavior.<P>
|
|
<P>
|
|
Some members of the cleanup committee think that EXPLICITLY-VAGUE is<P>
|
|
really a change from the intent of CLtL. However, the current<P>
|
|
sentiment is to be less rather than more specific about the behavior<P>
|
|
of debugging tools (25.3 of CLtL).<P>
|
|
<P>
|
|
It might be possible to extend <A REL=DEFINITION HREF="../Body/f_descri.htm#describe"><B>DESCRIBE</B></A> to have additional <P>
|
|
keywords (:VERBOSE, :INTERACTIVE-ALLOWED) to cover <P>
|
|
additional behavior. <P>
|
|
<P>
|
|
Pierson supports NO because he thinks it's important for there to be<P>
|
|
some way for portable programs to present this sort of information<P>
|
|
to the user. While the exact data and format presented is<P>
|
|
implementation dependent and thus outside of the bounds of<P>
|
|
standardization, the existance of such data is neither.<P>
|
|
<P>
|
|
Moon opposes NO because "it creates extra work for implementors and<P>
|
|
users of at least one implementation, for no compelling reason."<P>
|
|
<P>
|
|
Moon suggested as a compromise only allowing <A REL=DEFINITION HREF="../Body/f_descri.htm#describe"><B>DESCRIBE</B></A> to <A REL=DEFINITION HREF="../Body/f_provid.htm#require"><B>require</B></A><P>
|
|
user input from "interactive streams". Several other members of the<P>
|
|
committee like this in principle but question whether it's feasible<P>
|
|
since we have neither defined "interactive streams" nor provided any<P>
|
|
portable way to tell if a stream is interactive.<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>
|