[HARLEQUIN][Common Lisp HyperSpec (TM)] [Previous][Up][Next]


Issue CHARACTER-VS-CHAR Writeup

Issue:        CHARACTER-VS-CHAR

Forum: Editorial

References: Character Proposal 2.3.1, MAKE-DISPATCH-MACRO-CHARACTER (p363),

GET-MACRO-CHARACTER (p362), SET-MACRO-CHARACTER (p362)

GET-DISPATCH-MACRO-CHARACTER (p364),

SET-DISPATCH-MACRO-CHARACTER (p364)

Category: CHANGE

Edit history: 12-Nov-90, Version 1 by Pitman

14-Nov-90, Version 2 by Pitman (minor mods to Rationale, Discussion)

15-Mar-91, Version 3 by Pitman (one new proposal, some endorsements)

Status: For Internal Discussion

Problem Description:

Character proposal 2.3.1 adds the names BASE-CHARACTER and

EXTENDED-CHARACTER. These are naming-wise inconsistent with

STANDARD-CHAR.

Proposal (CHAR-VS-CHARACTER:INCONSISTENTLY-STATUS-QUO)

Leave things as they are.

Proposal (CHAR-VS-CHARACTER:LESS-INCONSISTENT-SHORT)

Rename BASE-CHARACTER to BASE-CHAR.

Rename EXTENDED-CHARACTER to EXTENDED-CHAR.

Proposal (CHAR-VS-CHARACTER:LESS-INCONSISTENT-LONG)

Rename STANDARD-CHAR to STANDARD-CHARACTER.

Proposal (CHAR-VS-CHARACTER:CONSISTENTLY-CHAR)

Rename BASE-CHARACTER to BASE-CHAR.

Rename EXTENDED-CHARACTER to EXTENDED-CHAR.

Rename MAKE-DISPATCH-MACRO-CHARACTER to MAKE-DISPATCH-MACRO-CHAR.

Rename SET-MACRO-CHARACTER to SET-MACRO-CHAR.

Rename GET-DISPATCH-MACRO-CHARACTER to GET-DISPATCH-MACRO-CHAR.

Rename SET-DISPATCH-MACRO-CHARACTER to SET-DISPATCH-MACRO-CHAR.

Rename GET-MACRO-CHARACTER to GET-MACRO-CHAR.

Proposal (CHAR-VS-CHARACTER:REALLY-FIX-THINGS-UP)

Rename BASE-CHARACTER to BASE-CHAR.

Rename EXTENDED-CHARACTER to EXTENDED-CHAR.

Rename MAKE-DISPATCH-MACRO-CHARACTER to MAKE-DISPATCH-MACRO-CHAR.

Remove the functions GET-MACRO-CHARACTER, SET-MACRO-CHARACTER,

GET-DISPATCH-MACRO-CHARACTER, and SET-DISPATCH-MACRO-CHARACTER.

Create setfable functions MACRO-CHAR and DISPATCH-MACRO-CHAR,

such that:

- (MACRO-CHAR c [r]) means what (GET-MACRO-CHARACTER x r)

used to mean.

(SETF (MACRO-CHAR c [r]) (VALUES fn [nt])) means what

(SET-MACRO-CHARACTER c fn nt r) used to mean.

- (DISPATCH-MACRO-CHAR d s [r]) means what

(GET-DISPATCH-MACRO-CHAR d s [r]) used to mean.

- (SETF (DISPATCH-MACRO-CHAR d s [r]) fn) means what

(SET-DISPATCH-MACRO-CHAR d s fn [r]) used to mean.

Rationale:

We've enumerated the positions that people were likely to have

so that they could refer succinctly to their position by name.

INCONSISTENTLY-STATUS-QUO: Leaves the language unchanged.

LESS-INCONSISTENT-SHORT: Changes only that part of the language

which is not in CLtL, and which users probably aren't using

much yet anyway. At least makes all the type names use

"-CHAR" consistently. (Stops short of addressing why there

is a name SET-SYNTAX-FROM-CHAR but another name

GET-MACRO-CHARACTER only to preserve the status quo.)

LESS-INCONSISTENT-LONG: Changes only one name At least makes

all the type names use "CHARACTER" consistently. (Stops

short of addressing why there is a name SET-SYNTAX-FROM-CHAR

but another name GET-MACRO-CHARACTER only to preserve the

status quo.)

CONSISTENTLY-CHAR: Changes even some things which were in

CLtL, but does so in a manner that is predictably consistent:

The word "CHARACTER" is shortened to "CHAR" whenever it appears

hyphenated together with other words. This would be harder

on existing programs, but easier for new users.

REALLY-FIX-THINGS-UP: Like CONSISTENTLY-CHAR, but also takes

advantage of a last opportunity to make the language use SETF more

consistently. Probably the reason this didn't originally use SETF

was the lack of clarity in the managing of multiple values.

Also, SET-MACRO-CHARACTER and SET-DISPATCH-MACRO-CHARACTER are the

only two symbols in CL which begin with the substring "SET-" but

are not set-manipulation primitives.

Current Practice:

No one does this.

Cost to Implementors:

Small, in all cases.

Cost to Users:

INCONSISTENTLY-STATUS-QUO: None.

LESS-INCONSISTENT-SHORT: Very small.

LESS-INCONSISTENT-LONG: Small.

CONSISTENTLY-CHAR and REALLY-FIX-THINGS-UP: It's very easy to

write the requisite compatibility functions in order to support the

old names during a transition period. With all the other things

people are having to do to convert, this is relatively little extra

burden.

Cost of Non-Adoption:

See aesthetics.

Benefits:

Aesthetic and Mnemonic.

Aesthetics:

If this is adopted... The affected parts of the language will be...

INCONSISTENTLY-STATUS-QUO glaringly unaesthetic

LESS-INCONSISTENT-SHORT tolerable, but not pretty

LESS-INCONSISTENT-LONG tolerable, but not pretty

CONSISTENTLY-CHAR reasonable

REALLY-FIX-THINGS-UP very pretty

Discussion:

KMP prefers (in decreasing order of preference) REALLY-FIX-THINGS-UP,

then CONSISTENTLY-CHAR, then LESS-INCONSISTENT-SHORT or

LESS-INCONSISTENT-LONG, then INCONSISTENTLY-STATUS-QUO.

Scott Cyphers (Symbolics) concurs with this ordering, except his first

choice would be for the [non-existent] option REALLY-FIX-THINGS-UP-CHARACTER.

Scott McKay (Symbolics) likes CONSISTENTLY-CHAR but would thinks

REALLY-FIX-THINGS-UP would be ok.

Bob Cassels at Symbolics asked why there isn't a CONSISTENTLY-CHARACTER

option. KMP replies:

In general, we have tried to spell out words in the language. There

are, of course, some glaring exceptions. However, I feel that

certain English words (like "paren", "char", "info", and "demo")

have acquired such high frequency usage in the Computer Science

arena that we are basically just waiting for the dictionary-makers

to catch up with the natural-language phenomenon of shortening of

higher frequency words by its speakers. As such, I feel the issue

is not one of either "char" or "character" being more correct, but

rather one of choosing the names in such a way that users can

reliably remember which name is used in which situation.

Masinter supports REALLY-FIX-THINGS-UP.

Moon and Sandra prefer the long name CHARACTER to the short name CHAR.

(Moon voiced implicit support for LESS-INCONSISTENT-LONG, even though

the option didn't exist yet.)

JonL says he and others at Lucid think that changing a lot of names at

this point is a bad idea. [It is for this reason that option

LESS-INCONSISTENT-LONG was added in v3 of this proposal--to offer a

minimalist fix that might satisfy them.]


[Starting Points][Contents][Index][Symbols][Glossary][Issues]
Copyright 1996, The Harlequin Group Limited. All Rights Reserved.