Re: Case-sensitivity goals, policy and implementation



>>>>> "ole" == ole rohne <ole.rohne@cern.ch> writes:

    ole> The version of IMPLODE1 that I'm looking at calls INTERN, so there is
    ole> no READing involved and hence no *READTABLE*, right? In my
    ole> understanding, there are now two possible ways of implementing the
    ole> READTABLE-CASE :INVERT semantics:

    ole> 1. Replace any explicit case conversion and INTERM wit a call to
    ole>    READ-FROM-STRING with *READTABLE* and *PACKAGE* dynamically bound

As you can probably tell from the patch I sent, I used
read-from-string, but in a very gross way.  Needs cleaning up. :-) I
think this would be the preferred way instead of doing it ourselves.

All uses of intern will need to be examined, as well as make-symbol.
For printing, we'll need to examine all places that use symbol-name.

    ole> 2. Explicitly code the :INVERT logic and call INTERN, ie something like:
    ole>    (cond ((not (some #'upper-case-p string)) (intern (string-upcase string)))
    ole>          ((not (some #'lower-case-p string)) (intern (string-downcase string)))
    ole>          (t (intern string)))

Look, there's the readtable-case implementation of :invert for gcl!
All gcl needs now is the logic to do the right thing for :invert
and print-case :upcase.  :-)

    ole> (I still think *PACKAGE* should be explicit)

Everything in maxima is in the maxima package.  If we ever get
multiple packages, we'll have to examine this.

    ole> BTW, I'm wondering about a possible bug in IMPLODE1 - it seems to call
    ole> INTERN repeatedly with the same string *STRING-FOR-IMPLODE*, modifying
    ole> the string between each call? As I understand the Hyperspec, the
    ole> consequences are indefined...

Yes, you're right.  These changes will at least fix that problem.

Ray