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

206 lines
12 KiB
HTML
Raw 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 CHARACTER-VS-CHAR 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/iss026_w.htm">
<LINK REL=UP HREF="../Issues/iss046.htm">
<LINK REL=NEXT HREF="../Issues/iss047_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/iss026_w.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Previous]" SRC="../Graphics/Prev.gif" ALIGN=Bottom></A><A REL=UP HREF="../Issues/iss046.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Up]" SRC="../Graphics/Up.gif" ALIGN=Bottom></A><A REL=NEXT HREF="../Issues/iss047_w.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Next]" SRC="../Graphics/Next.gif" ALIGN=Bottom></A></H1>
<HR>
<H2>Issue CHARACTER-VS-CHAR Writeup</H2>
<PRE><B>Issue:</B> <A HREF="iss046.htm">CHARACTER-VS-CHAR</A><P>
<B>Forum:</B> Editorial<P>
<B>References:</B> Character Proposal 2.3.1, <A REL=DEFINITION HREF="../Body/f_mk_dis.htm#make-dispatch-macro-character"><B>MAKE-DISPATCH-MACRO-CHARACTER</B></A> (p363),<P>
<A REL=DEFINITION HREF="../Body/f_set_ma.htm#get-macro-character"><B>GET-MACRO-CHARACTER</B></A> (p362), <A REL=DEFINITION HREF="../Body/f_set_ma.htm#set-macro-character"><B>SET-MACRO-CHARACTER</B></A> (p362)<P>
<A REL=DEFINITION HREF="../Body/f_set__1.htm#get-dispatch-macro-character"><B>GET-DISPATCH-MACRO-CHARACTER</B></A> (p364), <P>
<A REL=DEFINITION HREF="../Body/f_set__1.htm#set-dispatch-macro-character"><B>SET-DISPATCH-MACRO-CHARACTER</B></A> (p364)<P>
<B>Category:</B> CHANGE<P>
<B>Edit history:</B> 12-Nov-90, Version 1 by Pitman<P>
14-Nov-90, Version 2 by Pitman (minor mods to Rationale, Discussion)<P>
15-Mar-91, Version 3 by Pitman (one new proposal, some endorsements)<P>
<B>Status:</B> For Internal Discussion<P>
<P>
<B>Problem Description:<P>
</B><P>
Character proposal 2.3.1 adds the names BASE-CHARACTER and<P>
EXTENDED-CHARACTER. These are naming-wise inconsistent with<P>
<A REL=DEFINITION HREF="../Body/t_std_ch.htm#standard-char"><B>STANDARD-CHAR</B></A>.<P>
<P>
Proposal (CHAR-VS-CHARACTER:INCONSISTENTLY-STATUS-QUO)<P>
<P>
Leave things as they are.<P>
<P>
Proposal (CHAR-VS-CHARACTER:LESS-INCONSISTENT-SHORT)<P>
<P>
Rename BASE-CHARACTER to <A REL=DEFINITION HREF="../Body/t_base_c.htm#base-char"><B>BASE-CHAR</B></A>. <P>
Rename EXTENDED-CHARACTER to <A REL=DEFINITION HREF="../Body/t_extend.htm#extended-char"><B>EXTENDED-CHAR</B></A>. <P>
<P>
Proposal (CHAR-VS-CHARACTER:LESS-INCONSISTENT-LONG)<P>
<P>
Rename <A REL=DEFINITION HREF="../Body/t_std_ch.htm#standard-char"><B>STANDARD-CHAR</B></A> to STANDARD-CHARACTER.<P>
<P>
Proposal (CHAR-VS-CHARACTER:CONSISTENTLY-CHAR)<P>
<P>
Rename BASE-CHARACTER to <A REL=DEFINITION HREF="../Body/t_base_c.htm#base-char"><B>BASE-CHAR</B></A>.<P>
Rename EXTENDED-CHARACTER to <A REL=DEFINITION HREF="../Body/t_extend.htm#extended-char"><B>EXTENDED-CHAR</B></A>.<P>
<P>
Rename <A REL=DEFINITION HREF="../Body/f_mk_dis.htm#make-dispatch-macro-character"><B>MAKE-DISPATCH-MACRO-CHARACTER</B></A> to MAKE-DISPATCH-MACRO-CHAR.<P>
Rename <A REL=DEFINITION HREF="../Body/f_set_ma.htm#set-macro-character"><B>SET-MACRO-CHARACTER</B></A> to SET-MACRO-CHAR. <P>
Rename <A REL=DEFINITION HREF="../Body/f_set__1.htm#get-dispatch-macro-character"><B>GET-DISPATCH-MACRO-CHARACTER</B></A> to GET-DISPATCH-MACRO-CHAR.<P>
Rename <A REL=DEFINITION HREF="../Body/f_set__1.htm#set-dispatch-macro-character"><B>SET-DISPATCH-MACRO-CHARACTER</B></A> to SET-DISPATCH-MACRO-CHAR.<P>
Rename <A REL=DEFINITION HREF="../Body/f_set_ma.htm#get-macro-character"><B>GET-MACRO-CHARACTER</B></A> to GET-MACRO-CHAR.<P>
<P>
Proposal (CHAR-VS-CHARACTER:REALLY-FIX-THINGS-UP)<P>
<P>
Rename BASE-CHARACTER to <A REL=DEFINITION HREF="../Body/t_base_c.htm#base-char"><B>BASE-CHAR</B></A>.<P>
Rename EXTENDED-CHARACTER to <A REL=DEFINITION HREF="../Body/t_extend.htm#extended-char"><B>EXTENDED-CHAR</B></A>.<P>
<P>
Rename <A REL=DEFINITION HREF="../Body/f_mk_dis.htm#make-dispatch-macro-character"><B>MAKE-DISPATCH-MACRO-CHARACTER</B></A> to MAKE-DISPATCH-MACRO-CHAR.<P>
<P>
Remove the functions <A REL=DEFINITION HREF="../Body/f_set_ma.htm#get-macro-character"><B>GET-MACRO-CHARACTER</B></A>, <A REL=DEFINITION HREF="../Body/f_set_ma.htm#set-macro-character"><B>SET-MACRO-CHARACTER</B></A>,<P>
<A REL=DEFINITION HREF="../Body/f_set__1.htm#get-dispatch-macro-character"><B>GET-DISPATCH-MACRO-CHARACTER</B></A>, and <A REL=DEFINITION HREF="../Body/f_set__1.htm#set-dispatch-macro-character"><B>SET-DISPATCH-MACRO-CHARACTER</B></A>. <P>
<P>
Create setfable functions MACRO-CHAR and DISPATCH-MACRO-CHAR, <P>
such that:<P>
<P>
- (MACRO-CHAR c [r]) means what (<A REL=DEFINITION HREF="../Body/f_set_ma.htm#get-macro-character"><B>GET-MACRO-CHARACTER</B></A> x r) <P>
used to mean.<P>
<P>
(<A REL=DEFINITION HREF="../Body/a_setf.htm#setf"><B>SETF</B></A> (MACRO-CHAR c [r]) (<A REL=DEFINITION HREF="../Body/a_values.htm#values"><B>VALUES</B></A> fn [nt])) means what<P>
(<A REL=DEFINITION HREF="../Body/f_set_ma.htm#set-macro-character"><B>SET-MACRO-CHARACTER</B></A> c fn nt r) used to mean.<P>
<P>
- (DISPATCH-MACRO-CHAR d s [r]) means what <P>
(GET-DISPATCH-MACRO-CHAR d s [r]) used to mean.<P>
<P>
- (<A REL=DEFINITION HREF="../Body/a_setf.htm#setf"><B>SETF</B></A> (DISPATCH-MACRO-CHAR d s [r]) fn) means what<P>
(SET-DISPATCH-MACRO-CHAR d s fn [r]) used to mean.<P>
<P>
<B>Rationale:<P>
</B><P>
We've enumerated the positions that people were likely to have<P>
so that they could refer succinctly to their position by name.<P>
<P>
INCONSISTENTLY-STATUS-QUO: Leaves the language unchanged.<P>
<P>
LESS-INCONSISTENT-SHORT: Changes only that part of the language<P>
which is not in CLtL, and which users probably aren't using<P>
much yet anyway. At least makes all the type names use<P>
&quot;-CHAR&quot; consistently. (Stops short of addressing why there<P>
is a name <A REL=DEFINITION HREF="../Body/f_set_sy.htm#set-syntax-from-char"><B>SET-SYNTAX-FROM-CHAR</B></A> but another name <P>
<A REL=DEFINITION HREF="../Body/f_set_ma.htm#get-macro-character"><B>GET-MACRO-CHARACTER</B></A> only to preserve the status quo.)<P>
<P>
LESS-INCONSISTENT-LONG: Changes only one name At least makes<P>
all the type names use &quot;CHARACTER&quot; consistently. (Stops<P>
short of addressing why there is a name <A REL=DEFINITION HREF="../Body/f_set_sy.htm#set-syntax-from-char"><B>SET-SYNTAX-FROM-CHAR</B></A><P>
but another name <A REL=DEFINITION HREF="../Body/f_set_ma.htm#get-macro-character"><B>GET-MACRO-CHARACTER</B></A> only to preserve the <P>
status quo.)<P>
<P>
CONSISTENTLY-CHAR: Changes even some things which were in<P>
CLtL, but does so in a manner that is predictably consistent:<P>
The word &quot;CHARACTER&quot; is shortened to &quot;CHAR&quot; whenever it appears<P>
hyphenated together with other words. This would be harder<P>
on existing programs, but easier for new users.<P>
<P>
REALLY-FIX-THINGS-UP: Like CONSISTENTLY-CHAR, but also takes <P>
advantage of a last opportunity to make the language use <A REL=DEFINITION HREF="../Body/a_setf.htm#setf"><B>SETF</B></A> more<P>
consistently. Probably the reason this didn't originally use <A REL=DEFINITION HREF="../Body/a_setf.htm#setf"><B>SETF</B></A><P>
was the lack of clarity in the managing of multiple values.<P>
Also, <A REL=DEFINITION HREF="../Body/f_set_ma.htm#set-macro-character"><B>SET-MACRO-CHARACTER</B></A> and <A REL=DEFINITION HREF="../Body/f_set__1.htm#set-dispatch-macro-character"><B>SET-DISPATCH-MACRO-CHARACTER</B></A> are the<P>
only two symbols in CL which begin with the substring &quot;SET-&quot; but<P>
are not set-manipulation primitives.<P>
<P>
<B>Current Practice:<P>
</B><P>
No one does this.<P>
<P>
<B>Cost to Implementors:<P>
</B><P>
Small, in all cases.<P>
<P>
<B>Cost to Users:<P>
</B><P>
INCONSISTENTLY-STATUS-QUO: None.<P>
<P>
LESS-INCONSISTENT-SHORT: Very small.<P>
<P>
LESS-INCONSISTENT-LONG: Small.<P>
<P>
CONSISTENTLY-CHAR and REALLY-FIX-THINGS-UP: It's very easy to<P>
write the requisite compatibility functions in order to support the<P>
old names during a transition period. With all the other things<P>
people are having to do to convert, this is relatively little extra<P>
burden.<P>
<P>
<B>Cost of Non-Adoption:<P>
</B><P>
See aesthetics.<P>
<P>
<B>Benefits:<P>
</B><P>
Aesthetic and Mnemonic.<P>
<P>
<B>Aesthetics:<P>
</B><P>
If this is adopted... The affected parts of the language will be...<P>
<P>
INCONSISTENTLY-STATUS-QUO glaringly unaesthetic<P>
LESS-INCONSISTENT-SHORT tolerable, but not pretty<P>
LESS-INCONSISTENT-LONG tolerable, but not pretty<P>
CONSISTENTLY-CHAR reasonable<P>
REALLY-FIX-THINGS-UP very pretty<P>
<P>
<B>Discussion:<P>
</B><P>
KMP prefers (in decreasing order of preference) REALLY-FIX-THINGS-UP,<P>
then CONSISTENTLY-CHAR, then LESS-INCONSISTENT-SHORT or <P>
LESS-INCONSISTENT-LONG, then INCONSISTENTLY-STATUS-QUO.<P>
Scott Cyphers (Symbolics) concurs with this ordering, except his first <P>
choice would be for the [non-existent] option REALLY-FIX-THINGS-UP-CHARACTER.<P>
Scott McKay (Symbolics) likes CONSISTENTLY-CHAR but would thinks <P>
REALLY-FIX-THINGS-UP would be ok.<P>
<P>
Bob Cassels at Symbolics asked why there isn't a CONSISTENTLY-CHARACTER<P>
option. KMP replies:<P>
In general, we have tried to spell out words in the language. There<P>
are, of course, some glaring exceptions. However, I feel that<P>
certain English words (like &quot;paren&quot;, &quot;char&quot;, &quot;info&quot;, and &quot;demo&quot;) <P>
have acquired such high frequency usage in the Computer Science <P>
arena that we are basically just waiting for the dictionary-makers<P>
to catch up with the natural-language phenomenon of shortening of<P>
higher frequency words by its speakers. As such, I feel the issue<P>
is not one of either &quot;char&quot; or &quot;character&quot; being more correct, but<P>
rather one of choosing the names in such a way that users can <P>
reliably remember which name is used in which situation.<P>
<P>
Masinter supports REALLY-FIX-THINGS-UP.<P>
<P>
Moon and Sandra prefer the long name <A REL=DEFINITION HREF="../Body/a_ch.htm#character"><B>CHARACTER</B></A> to the short name <A REL=DEFINITION HREF="../Body/f_char_.htm#char"><B>CHAR</B></A>.<P>
(Moon voiced implicit support for LESS-INCONSISTENT-LONG, even though<P>
<A REL=DEFINITION HREF="../Body/s_the.htm#the"><B>the</B></A> option didn't exist yet.)<P>
<P>
JonL says he and others at Lucid think that changing a lot of names at<P>
this point is a bad idea. [It is for this reason that option<P>
LESS-INCONSISTENT-LONG was added in v3 of this proposal--to offer a <P>
minimalist fix that might satisfy them.]<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>