Case-sensitivity goals, policy and implementation



   From: Richard Fateman <fateman at cs>
   
   My personal take on this is:  if you believe your code is
   case insensitive,  (that is x=X and you use them interchangeably),
   then before I do anything else with your code
   I run it through a filter that converts all letters
   to lower case. I then throw out your original code to avoid
   further confusion. This can be done in one command line in unix.

Richard -- I have a similar prejudice against upper- and mixed-case
code, but you cannot transform Lisp (or mayber even Maxima) code to
lower case preserving semantics with a single Unix command, at least
not a simple one.  Consider:  (format NIL "Hello, ~A!" x)

Lisp won't care about the case of symbol names, not the case of ~A,
but the program clearly intends "Hello" to be capitalized.  Ditto for
character constants.

I have an ancient program that downcases Common Lisp syntax,
preserving case of strings and character constants.  I'd be happy to
contribute it.  It's a short lex program (consisting mostly of
punctuation characters!) that implements your simple Unix command
filter.  The things it does not automatically handle are string
constants in provide, require, and defpackage.

I don't know how well it would work on Maxima syntax.