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

Issue: FORMAT-PRETTY-PRINT (version 5)



I expect to eventually support this proposal, but would like to see a
couple of issues dealt with first...

    Date: 2 Oct 88 13:31 PDT
    From: masinter.pa@Xerox.COM

    ...
    Issue:         FORMAT-PRETTY-PRINT
    ...
    Proposal (FORMAT-PRETTY-PRINT:YES):

    Specify that FORMAT does rebind any of the printer control
    variables (*PRINT-...) except as follows:

I assume you mean "...does not rebind..."

    ~R
	Binds *PRINT-ESCAPE* to NIL, *PRINT-RADIX* to NIL, and
	*PRINT-BASE* to the value of the first argument iff a first
	argument is specified.

I'd say: ``Iff a first argument is specified, binds *PRINT-ESCAPE*
           to NIL, *PRINT-RADIX* to NIL, and *PRINT-BASE* to the
	   value of the first argument.''
It doesn't really matter what happens if there is no argument, but
this would avoid any silly questions on the subject.

Actually: CLtL doesn't say the English ordinal is base-10. One
could imagine expecting that someone might want
 (LET ((*PRINT-BASE* 8)) (FORMAT NIL "~R" 8))
 => "ten"
Presumably this is not what anyone does, but perhaps we should
shoe-horn that in here (to avoid writing up a whole issue for such
a silly little detail). ... Or perhaps we should say that in the no
argument case it binds *PRINT-BASE* to 10, and let people infer from
that that it's insensitive to bindings of *PRINT-BASE* in the 
no-argument case.

    ~F,~G,~E,~$
	Binds *PRINT-ESCAPE* to NIL.

Again, one might expect that
 (LET ((*PRINT-BASE* 8)) (FORMAT NIL "~E" 8.5))
should return "10.4". Maybe we should say that *PRINT-BASE* is
bound to 10, etc. just to avoid this issue?

    Test Cases/Examples:
    ...

The test case is very cute but overly complicated and doesn't
address the full scope of the proposal.