123 lines
6.7 KiB
HTML
123 lines
6.7 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 STEP-MINIMAL 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/iss325_w.htm">
|
|
<LINK REL=UP HREF="../Issues/iss326.htm">
|
|
<LINK REL=NEXT HREF="../Issues/iss327_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/iss325_w.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Previous]" SRC="../Graphics/Prev.gif" ALIGN=Bottom></A><A REL=UP HREF="../Issues/iss326.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Up]" SRC="../Graphics/Up.gif" ALIGN=Bottom></A><A REL=NEXT HREF="../Issues/iss327_w.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Next]" SRC="../Graphics/Next.gif" ALIGN=Bottom></A></H1>
|
|
|
|
<HR>
|
|
|
|
|
|
|
|
<H2>Issue STEP-MINIMAL Writeup</H2>
|
|
|
|
<PRE><B>Issue:</B> <A HREF="iss326.htm">STEP-MINIMAL</A><P>
|
|
<B>Forum:</B> Editorial<P>
|
|
<B>References:</B> <A REL=DEFINITION HREF="../Body/m_step.htm#step"><B>STEP</B></A> (p441)<P>
|
|
<B>Category:</B> CLARIFICATION<P>
|
|
<B>Edit history:</B> 04-Mar-91, Version 1 by Pitman<P>
|
|
<B>Status:</B> For X3J13 consideration<P>
|
|
<P>
|
|
<B>Problem Description:<P>
|
|
</B><P>
|
|
What is the minimal interpretation of STEP? Specifically, must it<P>
|
|
pause for some user interaction, or can it just proceed without<P>
|
|
pausing in implementations (probably `compiled-only' implementations)<P>
|
|
which do not choose to implement this feature?<P>
|
|
<P>
|
|
In particular, are either of the following implementations valid?<P>
|
|
<P>
|
|
(<A REL=DEFINITION HREF="../Body/m_defmac.htm#defmacro"><B>DEFMACRO</B></A> <A REL=DEFINITION HREF="../Body/m_step.htm#step"><B>STEP</B></A> (FORM) `(<A REL=DEFINITION HREF="../Body/s_progn.htm#progn"><B>PROGN</B></A> ,FORM))<P>
|
|
<P>
|
|
or<P>
|
|
<P>
|
|
(<A REL=DEFINITION HREF="../Body/m_defmac.htm#defmacro"><B>DEFMACRO</B></A> <A REL=DEFINITION HREF="../Body/m_step.htm#step"><B>STEP</B></A> (FORM) <P>
|
|
`(<A REL=DEFINITION HREF="../Body/s_let_l.htm#let"><B>LET</B></A> ((<A REL=DEFINITION HREF="../Body/a_values.htm#values"><B>VALUES</B></A> (<A REL=DEFINITION HREF="../Body/m_mult_1.htm#multiple-value-list"><B>MULTIPLE-VALUE-LIST</B></A> ,FORM)))<P>
|
|
(<A REL=DEFINITION HREF="../Body/f_format.htm#format"><B>FORMAT</B></A> T "~&~S => ~{~S~^, ~}~%" ',FORM <A REL=DEFINITION HREF="../Body/a_values.htm#values"><B>VALUES</B></A>)<P>
|
|
(<A REL=DEFINITION HREF="../Body/f_vals_l.htm#values-list"><B>VALUES-LIST</B></A> <A REL=DEFINITION HREF="../Body/a_values.htm#values"><B>VALUES</B></A>)))<P>
|
|
<P>
|
|
<B>Proposal (STEP-MINIMAL:PERMIT-PROGN):<P>
|
|
</B><P>
|
|
Clarify that it is permissible to implement (<A REL=DEFINITION HREF="../Body/m_step.htm#step"><B>STEP</B></A> x) as (<A REL=DEFINITION HREF="../Body/s_progn.htm#progn"><B>PROGN</B></A> x)<P>
|
|
in implementations which do not wish to <A REL=DEFINITION HREF="../Body/f_provid.htm#provide"><B>provide</B></A> more elaborate<P>
|
|
functionality.<P>
|
|
<P>
|
|
Rationale:<P>
|
|
<P>
|
|
For a delivery Lisp, this would be a minimal amount of work.<P>
|
|
<P>
|
|
<B>Proposal (STEP-MINIMAL:REQUIRE-PAUSE):<P>
|
|
</B><P>
|
|
Clarify that (<A REL=DEFINITION HREF="../Body/m_step.htm#step"><B>STEP</B></A> x) must, at minimum, pause in some way that permits<P>
|
|
user intervention.<P>
|
|
<P>
|
|
This also implies that in implementaions which do have a query loop, <P>
|
|
some form of query must occur even for constant forms, like (<A REL=DEFINITION HREF="../Body/m_step.htm#step"><B>STEP</B></A> 5).<P>
|
|
<P>
|
|
Rationale:<P>
|
|
<P>
|
|
Users who introduce <A REL=DEFINITION HREF="../Body/m_step.htm#step"><B>STEP</B></A> into a program might do so on the assumption<P>
|
|
that execution will not proceed beyond that point (e.g., into some <P>
|
|
dangerous code that follows) without offering them a way to intervene <P>
|
|
first.<P>
|
|
<P>
|
|
<B>Current Practice:<P>
|
|
</B><P>
|
|
Symbolics Genera requires intervention.<P>
|
|
<P>
|
|
Symbolics Cloe Runtime (the part that runs on the 386) behaves like <A REL=DEFINITION HREF="../Body/s_progn.htm#progn"><B>PROGN</B></A><P>
|
|
in the example I tried (a couple of nested arithmetic operations).<P>
|
|
<P>
|
|
<B>Cost to Implementors:<P>
|
|
</B><P>
|
|
REQUIRE-PAUSE: Probably none. If there are any minimalist <P>
|
|
implementations which do not currently <A REL=DEFINITION HREF="../Body/f_provid.htm#require"><B>require</B></A> a pause now, they<P>
|
|
would need a very small amount of additional code.<P>
|
|
<P>
|
|
PERMIT-PROGN: None.<P>
|
|
<P>
|
|
<B>Cost to Users:<P>
|
|
</B><P>
|
|
None. This is a debugging feature that affects -how- Lisp is used in<P>
|
|
subtle ways, but is not likely to be present in stable code so wouldn't <P>
|
|
have a direct cost. It might be argued that there was a slight cost<P>
|
|
to PERMIT-PROGN for users who wanted the pause and didn't get it in<P>
|
|
some implementation; there is also a risk of larger cost with <P>
|
|
PERMIT-PROGN of users who expect a pause and don't get it and fall <P>
|
|
through to code they didn't intend to run.<P>
|
|
<P>
|
|
<B>Cost of Non-Adoption:<P>
|
|
</B><P>
|
|
Unclear specification. Implementors of certain implementations won't<P>
|
|
know what to do. Users won't know what to expect.<P>
|
|
<P>
|
|
<B>Benefits:<P>
|
|
</B><P>
|
|
See above.<P>
|
|
<P>
|
|
<B>Aesthetics:<P>
|
|
</B><P>
|
|
Probably negligible.<P>
|
|
<P>
|
|
<B>Discussion:<P>
|
|
</B><P>
|
|
Pitman has a slight preference for REQUIRE-PAUSE, but supports any<P>
|
|
interpretation that makes this clear.<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>
|