1
0
Fork 0
cl-sites/HyperSpec-7-0/HyperSpec/Issues/iss269_w.htm

141 lines
8 KiB
HTML
Raw Permalink Normal View History

2024-04-01 10:24:07 +02:00
<!-- 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 PLIST-DUPLICATES 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/iss268_w.htm">
<LINK REL=UP HREF="../Issues/iss269.htm">
<LINK REL=NEXT HREF="../Issues/iss270_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/iss268_w.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Previous]" SRC="../Graphics/Prev.gif" ALIGN=Bottom></A><A REL=UP HREF="../Issues/iss269.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Up]" SRC="../Graphics/Up.gif" ALIGN=Bottom></A><A REL=NEXT HREF="../Issues/iss270_w.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Next]" SRC="../Graphics/Next.gif" ALIGN=Bottom></A></H1>
<HR>
<H2>Issue PLIST-DUPLICATES Writeup</H2>
<PRE><B>Issue:</B> <A HREF="iss269.htm">PLIST-DUPLICATES</A><P>
Reference: X3J13/92-102, dpANS 12.24<P>
Glossary, p.26-33, initialization argument list<P>
Glossary, p.26-49<P>
Section 7.1.1, Initialization Arguments<P>
Section 3.4.1.4, Specifiers for keyword parameters<P>
X3J13/92-3107, Kim Barrett comment #7<P>
<B>Category:</B> CHANGE<P>
<B>Edit History:</B> Version 1, 1/6/93, Kim Barrett<P>
<B>Status:</B> Proposal ALLOW accepted 8-0, March 1993<P>
<P>
<P>
<B>Problem Description:<P>
</B><P>
The definition of \term{property list} states that the keys must all be<P>
distinct under <A REL=DEFINITION HREF="../Body/f_eq.htm#eq"><B>EQ</B></A>. This requirement goes all the way back to CLtL1.<P>
However, it causes some problems. It forced the editor to define the term<P>
\term{property list format} and describe some things in terms of that new<P>
term rather than describing them as simply being property lists, because<P>
these things were not required to satisfy the distinct keys requirement.<P>
Initialization argument lists and keyword argument lists are among the most<P>
pervasive, with the result that, strictly speaking, <A REL=DEFINITION HREF="../Body/f_getf.htm#getf"><B>GETF</B></A> and friends cannot<P>
be used to maniplulate such lists. Instead, users must either write their<P>
own functions for manipulation of such lists (with a possible concomitant<P>
performance loss) or rely on implementors to use the &quot;obvious&quot; implementations<P>
of these functions and hope for the best.<P>
<P>
<A REL=DEFINITION HREF="../Body/f_get_pr.htm#get-properties"><B>GET-PROPERTIES</B></A> is incorrectly documented as accepting a list in<P>
\term{property list format}, rather than a \term{property list}. This is a<P>
technical change without basis in committee decision. It then goes on to<P>
refer to that argument as a \term{property list}.<P>
<P>
The terms \term{property}, \term{property indicator}, and \term{property<P>
value} should probably all be defined in terms of lists in \term{property<P>
list format} rather than in terms of \term{property lists}.<P>
<P>
The term \term{initialization argument list} is not defined in terms of<P>
the term \term{property list format}.<P>
<P>
<B>Proposal (PLIST-DUPLICATES:ALLOW):<P>
</B><P>
1. Remove the unique key requirement for \term{property lists}, by deleting<P>
the following phrase from its definition in the glossary<P>
&quot;, and in which all \term{keys} are \term{different} under \funref{eq}&quot;<P>
and adding the following sentence<P>
&quot;When there is more than one \term{name} and \term{value} pair with<P>
the \term{same} under \funref{eq} \term{name} in a \term{property list},<P>
the first such pair determines the \term{property}.&quot;<P>
<P>
2. Remove the term \term{property list format}, instead using the term<P>
\term{property list} throughout the document.<P>
<P>
3. Specify that <A REL=DEFINITION HREF="../Body/m_remf.htm#remf"><B>REMF</B></A> and <A REL=DEFINITION HREF="../Body/f_rempro.htm#remprop"><B>REMPROP</B></A> only remove the first occurance (the<P>
\term{property}, as specified by (3) above) when there are multiple occurances<P>
of the same key. Similarly, specify that <A REL=DEFINITION HREF="../Body/a_setf.htm#setf"><B>SETF</B></A> of <A REL=DEFINITION HREF="../Body/f_getf.htm#getf"><B>GETF</B></A> and <A REL=DEFINITION HREF="../Body/a_setf.htm#setf"><B>SETF</B></A> of <A REL=DEFINITION HREF="../Body/f_get.htm#get"><B>GET</B></A> update<P>
only the first occurance.<P>
<P>
4. Change the definition of the term \term{initialization argument list} to<P>
specify that it is a \term{property list}. This allows the removal of some<P>
redundant text from the second paragraph of section 7.1.1.<P>
<P>
5. Change the description of keyword argument processing in section 3.4.1.4 to<P>
use the terms \term{property list}, \term{property}, \term{property indicator},<P>
and \term{property value} where appropriate.<P>
<P>
<B>Editorial Impact:<P>
</B><P>
One global query replace, a few changes to one glossary entry, and a small<P>
amount of rewriting of a couple paragraphs. In some cases the rewriting<P>
essentially amounts to deleting a bunch of text and then cleaning up.<P>
<P>
<B>Rationale:<P>
</B><P>
Addresses the problem description.<P>
<P>
Item 1 is the leftmost rule used by initialization and keyword arguments.<P>
<P>
<B>Current Practice:<P>
</B><P>
With the possible exception of REMF/REMPROP, does anybody *not* implement<P>
exactly this?<P>
<P>
<B>Cost to Implementors:<P>
</B><P>
Probably none.<P>
<P>
<B>Cost to Users:<P>
</B><P>
None.<P>
<P>
<B>Performance Impact:<P>
</B><P>
Users can use built-in operators for parsing such things as keyword argument<P>
lists, possibly improving performance slightly.<P>
<P>
<B>Benefits:<P>
</B><P>
Gets rid of some ugly terminalogical warts. Makes the document slightly<P>
smaller.<P>
<P>
<B>Discussion:<P>
</B><P>
In item 3, alternatively, could make it unspecified whether <A REL=DEFINITION HREF="../Body/m_remf.htm#remf"><B>REMF</B></A>, <A REL=DEFINITION HREF="../Body/f_rempro.htm#remprop"><B>REMPROP</B></A>,<P>
SETFof <A REL=DEFINITION HREF="../Body/f_getf.htm#getf"><B>GETF</B></A> and <A REL=DEFINITION HREF="../Body/a_setf.htm#setf"><B>SETF</B></A> of <A REL=DEFINITION HREF="../Body/f_get.htm#get"><B>GET</B></A> affect all or only the first occurance. However,<P>
only affecting the first is more consistent with the new definition of a<P>
property list and property. Not deleting all means that in some cases where<P>
using <A REL=DEFINITION HREF="../Body/m_remf.htm#remf"><B>REMF</B></A> the idiom (do () ((not (<A REL=DEFINITION HREF="../Body/m_remf.htm#remf"><B>remf</B></A> plist property)))) is useful.<P>
<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>