Subject: Re: Ruby performance woes
From: (Rob Warnock)
Date: Fri, 25 Apr 2008 21:12:52 -0500
Newsgroups: comp.lang.lisp
Message-ID: <>
Mark Wooding  <> wrote:
| I agree about the unpleasantness of uppercase Lisp.  I used to set
| *PRINT-CASE* to :DOWNCASE in my various .lisprcs, but I gave up partly
| because I realized that uppercase responses disambiguated the
| implementation's output from my input in transcripts, but mostly because
| far too many add-on systems broke in unpleasant ways, usually as a
| result of saying things like (intern (format nil "FROB-~A" some-symbol))
| and then trying to use FROB-MUMBLE.

You might try leaving *PRINT-CASE* alone and instead try changing
preserves any CamelCase you might need to READ from data files and
also downcases all-uppercase symbols when printing [yes, even with
*PRINT-CASE* remaining the default :UPCASE, see CLHS
"Effect of Readtable Case on the Lisp Printer"]. This gives the
following behavior:

    > (loop for sym in '(foo FooBar FOO)
	collect (list sym (symbol-name sym)))
    > (setf (readtable-case *readtable*) :invert)

    > (loop for sym in '(foo FooBar FOO)
	collect (list sym (symbol-name sym)))
    ((foo "FOO") (FooBar "FooBar") (FOO "foo"))

Of course, it messes up your FROB example as written:

    > (intern (format nil "FROB-~A" 'quux))

    > (symbol-name *)


But that can be fixed [compatibly with the defaults!] this way:

    > (intern (format nil "FROB-~A" (symbol-name 'quux)))

    > (symbol-name *)


This is arguably more nearly correct, since you shouldn't really
be concatenating a string and a symbol in the first place, but
rather two strings [which is what the "fix" does].

But I'll grant you that :INVERT *does* lose the feature you mentioned
"that uppercase responses disambiguate the implementation's output
from input in transcripts":

    cmu> (apropos 'quux)


So you still may prefer to stay with the standard defaults.


p.s. But it's really, *really* helpful when dealing
with external CamelCase input [such as EDIF files]...  ;-}  ;-}

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