Subject: Re: readtable-case was: Re: Lisp modularization
From: (Rob Warnock)
Date: Sat, 04 Jul 2009 21:12:38 -0500
Newsgroups: comp.lang.lisp
Message-ID: <>
Richard Fateman  <> wrote:
| Rob Warnock wrote:
| > D Herring  <> wrote:
| > +---------------
| > | True, but :invert is a braindead,
| > I'm not sure what you mean by "doesn't even work all the time".
| ...
| This discussion dates back to the ANSI CL standards committee,
| and has been revived periodically.

Indeed! And sometimes with far more heat than in this thread so far.  ;-}

| My view (at that time and now) is that the ANSI standard should have had 
| both cases.  The consensus-builders that prevailed were used to PDP-10s 
| with a much smaller character set and opted for mapping to upper-case.
| (6 characters in a 36-bit word meant you had only 64 different glyphs).

Actually, even as early as 1970 [when I started using PDP-10s], the
encoding for PDP-10 text files was *7*-bit ASCII [5 characters plus
one wasted bit per 36-bit word], which handled lowercase just fine --
provided you had a lowercase-capable terminal, which were just starting
to phase in [KSR37s plus a few 80x24 video terminals ("glass teletypes")],
as were mixed-case line printers [such as the 3rd-party Mohawk Data
Sciences printer we added to our -10]. Yes, TOPS-10 still used SIXBIT
for file & device names in system calls, but text files on disk were
all 7-bit case-sensitive ASCII. The main issue was that the terminals
people had readily available were still mostly ASR33s or KSR35s, which
were uppercase-only [albeit they (fortunately!) printed lowercase as
uppercase, having :UPCASE built into the hardware, as it were].

| The Berkeley view (from Unix on VAX with ASCII) was that both cases
| were valuable. My view did not prevail, except for our Lisp, and then
| as an option for Allegro Common Lisp.

Unfortunately, once the ANSI standard *was* passed with :UPCASE as
the reader default, the issue then became [and remains!] one of arguing
against The Standard, rather than any of the original technical merits.

| Unfortunately, the invert-casing of a readtable is insufficient 
| alteration to make a winner from a loser.  Indeed, preserving case
| of a readtable is not so good either.

No argument there! See my parallel reply to Daniel Herring. But IMHO,
*given* that :UPCASE *is* the ANSI default, :INVERT is a much better
alternative to use than :PRESERVE, but it is certainly no panacea.
You still have to revert to :UPCASE when reading/compiling legacy code.

| Here's the problem:
| the names of the standard functions must also be set up in the most 
| useful case. Do you want CONS, CAR, DEFUN?  eg. is it really OK to have
| (DEFUN CamelCase ( ....)...) or do you want (defun CamelCase ...)?

That's why, when forced to deal with CamelCase, I prefer :INVERT;
it lets you write the latter version.

| and do you want to be able to change your mind at runtime?

Absolutely!! I need :UPCASE to LOAD or COMPILE-FILE legacy code
and :INVERT when READ-ing CamelCase files (e.g., EDIF data).

| a discussion can be found in

Thanks for the ref. Also see the many past "interesting" discussions
in this group, e.g., one memorable exchange[1] between Erik Naggum,
Kent Pitman, Bruno Haible, and others way back in 1998!  ;-}  ;-}


[1] Advanced Search in Google Groups is down at the moment [all queries
    yield null results!!], but when it comes back you might start at or
    before Message-ID <>.

Rob Warnock			<>
627 26th Avenue			<URL:>
San Mateo, CA 94403		(650)572-2607