Re: Case-sensitivity goals, policy and implementation
Subject: Re: Case-sensitivity goals, policy and implementation
From: ole.rohne at cern
Date: Fri, 15 Oct 2004 08:30:41 +0200
Still thinking about READTABLE-CASE/READ-FROM-STRING versus explicit
case translation and INTERN:
I think it is good advise to let the Lisp Reader do just that (Read
Lisp) - use a parser for anything else. If the macsyma/maxima
developers for 30 years have resisted the temptation to call READ, I
don't think this is the time to give in.
Secondly, by the time you've set up the readtable (with casing, macro
characters and character syntax), and bound *PACKAGE*, *READ-EVAL* and
friends, the effort by far exceeds writing simply:
(cond ((not (some #'upper-case-p string)) (intern (string-upcase string) #:maxima))
((not (some #'lower-case-p string)) (intern (string-downcase string) #:maxima))
(t (intern string #:maxima)))
Ole