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

Re: Issue: READ-CASE-SENSITIVITY (Version 4)



> Mostly this still looks ok to me.  I will certainly encourage Moon to
> vote Yes on it. But I do have a few comments which I think would both
> improve the presentation and would help us avoid confusions down the
> road...
> 
>     Date: Thu, 22 Jun 89 19:32:17 BST
>     From: Jeff Dalton <jeff%aiai.edinburgh.ac.uk@NSFnet-Relay.AC.UK>
> 
>     Issue:        READ-CASE-SENSITIVITY
>     ...
>     Proposal (READ-CASE-SENSITIVITY:READTABLE-KEYWORDS)
>     ...
>       The READTABLE-CASE of a readtable also has significance when
>       printing.  The case in which letters are printed is determined as
>       follows:
>       ...
>       (The behavior when *PRINT-CASE* is :CAPITALIZE is like :UPCASE for
>       the first character and :DOWNCASE for the rest.)
>       ...
> 
> I think this parenthetic remark is more confusing than helpful.

I think you're right.  When I try to read it closely, I find that
I'm confused, and since I wrote it that should count.  It looks
like it might be trying to say something interesting when it
isn't.

> For example, it only applies in the cases of READTABLE-CASE
> being :UPCASE or :DOWNCASE, right? 

Right.

> Strictly, I think it is not necessary because the phrase "in the
> case specified by *PRINT-CASE*" means this.

I agree.  

> If you really feel the remark is needed, I suggest the
> notation:

>   [1] That is, :UPCASE means uppercase, :DOWNCASE means lowercase,
>       and :CAPITALIZE means uppercase for the first character and
>       lowercase for the rest of the characters.

I think I'll try just taking it out.

>    -----
>     Test Case:
> 
>        (let ((rt (copy-readtable nil)))
>         (mapcar
>           #'(lambda (case)
>               (setf (readtable-case rt) case)
>               (read-from-string "Zebra"))
>           '(:upcase :downcase :preserve :invert)))
> 
>         => (ZEBRA |zebra| |Zebra| |zEBRA|) ;as printed with the standard
>                                          ;readtable and *print-case* :upcase
> 
> This example is buggy, of course, because you need to bind
> *READTABLE*, not RT.

I must have made a mistake in editing at some point.

> It's also incomplete because it doesn't explain the interaction with
> *PRINT-CASE*.

What I wanted to do in the test case was just to show what internal
symbol-name was obtained given a setting for the READTABLE-CASE.
Perhaps I should do that more explicitly by showing the value returned
by SYMBOL-NAME.  But maybe I have to show the effect of *PRINT-ESCAPE*
too, which does happen in the current test case (though I think
what I have is now over-cautious.

> It would be better if we had a test case which at least did:

I'm a bit worried about running out of time.  I'll try to send
something better out later today, but I'm not sure I'll have time
to do a full set of test cases.

Thanks for you comments.  They are vary helpful.

-- Jeff