[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

No PRINT-time case conversion switch please!



KMP misunderstands the proposal for a switch to convert output to lower
case.  In the context of a Lisp that converts to upper case by default,
this switch would cause PRINT to do the following:

Figure out how the symbol would print normally, without the swtich being on.

If the symbol would print with |'s leave it alone.

Else, every character that is about to come out in upper case is
converted to lower-case and printed.  Lower-case chars, which would
normally be printed with slashes, are left untouched and the slash is
left in.

This is guaranteed to read in correctly with the upper-case-converting
reader.  If the user reads in such a file with conversion disabled, he
loses.

USER INPUT	OUTPUT (normal)		OUTPUT (with flag true)

FOO		FOO			foo
foo		FOO			foo
Foo		FOO			foo

|foo|		|foo|			|foo|
|X|		X			x
|x|		\x			\x

It is clear that, with or without the proposed switch, any printer has
to make some assumptions about what the reader is going to do.

-- Scott