Subject: Case-sensitivity goals, policy and implementation
From: Stavros Macrakis
Date: Wed, 13 Oct 2004 15:03:59 -0400
Yes, I did misunderstood your proposal. "Never mind." Let's try
again. Let me rephrase your proposal to see if I understand this
time:
a) Lowercase in Maxima is represented as uppercase internally and vice versa.
b) The implementation is: use a local readtable for interning Maxima
symbols, using readtable-case; and a local value of *print-case* when
displaying Maxima symbols.
(a) seems like a reasonable approach, but I am not sure that (b) makes
the implementation all that easy:
-- Does GCL implement readtable-case? If so, I guess it is not in the
default package. Is there some other way of remapping characters?
-- Presumably we'll need a Maxima version and a non-Maxima version of
intern, explodec, etc. Those are easy to write. How much work will
it be to figure out which one to use where? There are already
case-fiddling versions of implode etc. -- these will have to be
studied.
-- There are cases where case is manipulated explicitly, e.g. in
read-command-token-aux. I suspect this (and similar cases) doesn't
need to be changed, but someone needs to look at it.
-- On output, I don't think *print-case* is any help, since
displa.lisp doesn't use print at all. See the list-string function.
The code needs to be read over carefully.
-- All uses of getcharn etc. are also going to have to be studied.
All in all, I have nothing against using the readtable mechanism (if
GCL implements it), but it doesn't seem to avoid having to read
through all the code that touches intern etc., and it doesn't help at
all for output.
What am I missing?
-s