94 lines
4.8 KiB
HTML
94 lines
4.8 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 COLON-NUMBER 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/iss054_w.htm">
|
|
<LINK REL=UP HREF="../Issues/iss055.htm">
|
|
<LINK REL=NEXT HREF="../Issues/iss056_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/iss054_w.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Previous]" SRC="../Graphics/Prev.gif" ALIGN=Bottom></A><A REL=UP HREF="../Issues/iss055.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Up]" SRC="../Graphics/Up.gif" ALIGN=Bottom></A><A REL=NEXT HREF="../Issues/iss056_w.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Next]" SRC="../Graphics/Next.gif" ALIGN=Bottom></A></H1>
|
|
|
|
<HR>
|
|
|
|
|
|
|
|
<H2>Issue COLON-NUMBER Writeup</H2>
|
|
|
|
<PRE><B>Issue:</B> <A HREF="iss055.htm">COLON-NUMBER</A><P>
|
|
<B>References:</B> Parsing of Numbers and Symbols (p339-341, 343-344)<P>
|
|
<B>Category:</B> CLARIFICATION<P>
|
|
<B>Edit history:</B> 22-Oct-87, Version 1 by Pitman<P>
|
|
<B>Status:</B> For Internal Discussion<P>
|
|
<P>
|
|
<B>Problem Description:<P>
|
|
</B><P>
|
|
CLtL is unclear about whether a colon followed by a potential number<P>
|
|
is a potential number. There are passages which seem to address this<P>
|
|
issue unambiguously but fail.<P>
|
|
<P>
|
|
<B>Proposal (COLON-NUMBER:UNDEFINED):<P>
|
|
</B><P>
|
|
Clarify that syntax involving a leading colon followed by a potential<P>
|
|
number is not well-defined. That is, use of notation such as :1, :1/2,<P>
|
|
and :2^3 in a position where an expression appropriate for <A REL=DEFINITION HREF="../Body/f_rd_rd.htm#read"><B>READ</B></A> is<P>
|
|
expected is an error.<P>
|
|
<P>
|
|
<B>Rationale:<P>
|
|
</B><P>
|
|
This makes the status quo apparent.<P>
|
|
<P>
|
|
<B>Current Practice:<P>
|
|
</B><P>
|
|
Some implementations, such as Symbolics Lisp, claim the right to <P>
|
|
interpret this as an ``is an error'' situation where their<P>
|
|
upward-compatible extension is to parse ``:1'' as the number 1<P>
|
|
(incidentally, but uninterestingly, expressed in the <A REL=DEFINITION HREF="../Body/t_kwd.htm#keyword"><B>KEYWORD</B></A> package).<P>
|
|
<P>
|
|
Other implementations tokenize ``:1'' as a single token, identify it<P>
|
|
as a symbol, and then parse it as :\1 would be parsed.<P>
|
|
<P>
|
|
<B>Adoption Cost:<P>
|
|
</B><P>
|
|
None. This clarification forces no implementations to change.<P>
|
|
<P>
|
|
<B>Benefits:<P>
|
|
</B><P>
|
|
Programmer expectations that any useful behavior can be portably relied<P>
|
|
upon in this pathological case should be soundly trounced.<P>
|
|
<P>
|
|
<B>Conversion Cost:<P>
|
|
</B><P>
|
|
Slight. Some users may have mistakenly believed that this was an aspect<P>
|
|
of the language that was guaranteed and may have written programs that<P>
|
|
exploited that belief. Such incidences are probably very rare, however.<P>
|
|
Also, even in the few cases where such code fortuitously worked,<P>
|
|
implementations are likely to continue to support it so such code will<P>
|
|
probably continue to fortuitously work in many of those rare situations.<P>
|
|
<P>
|
|
<B>Aesthetics:<P>
|
|
</B><P>
|
|
Arguably a slight improvement in visual aesthetics. What was already <P>
|
|
a pretty marginal syntax is discouraged.<P>
|
|
<P>
|
|
<B>Discussion:<P>
|
|
</B><P>
|
|
Pitman supports this clarification. He thinks this issue is not a big<P>
|
|
deal, but it does crop up often enough to be a nuisance. It would be<P>
|
|
nice to have everyone acknowledge a unified position, even if that only<P>
|
|
meant agreeing to disagree.<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>
|