[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Guy Steele <gls@Think.COM>
- Subject: Re: PRETTY-PRINT-INTERFACE
- From: Dan L. Pierson <email@example.com>
- Date: Mon, 27 Feb 89 17:29:24 EST
- Cc: firstname.lastname@example.org
- In-reply-to: Your message of Fri, 24 Feb 89 17:40:25 -0500. <8902242240.AA10382@verdi.think.com>
You can add me to the list of strong supporters of this proposal.
While the proposal is long and complex, it is supported by a long
history of usage in several different Lisp environments. Unlike some
earlier members of this family, this version fits cleanly enough into
the rest of Common Lisp to warrant standardization.
A couple of specific comments:
Under aesthetics you might mention that some people will undoubtedly
find piling more hair on FORMAT ugly (of course these same people may
well find FORMAT in general ugly :-)).
The utility of *PRINT-LINES* becomes more obvious if it is pointed out
that Dick's pretty printers are implemented to print each line as it
is computed. This means that a small value for *PRINT-LINES* saves
significant time as well as output medium space. In fact, many people
find that a very pleasant REP loop is created by setting *PRINT-LINES*
to a value from 1-4, *PRINT-PRETTY* to T, and defining a short-name
function (say (PP*)) that funcalls *LAST-ABBREVIATED-PRINTING* with
abbreviation bound off. This is almost as fast and compact as, and
MUCH more readable than, a non-pretty-printing REP loop.
The advantages of compiled format strings (format functions) should be
brought out as benefits in their own right. The current proposal just
mentions them as a minor feature of XP.
At first this struck me a very cute end run around the failure of
STREAM-INFO, then I realized that one of the problems with STREAM-INFO
may have been that it was a standard at the wrong level. STREAM-INFO
permitted people to use XP, but not to count on it. This proposal
makes it possible to write portable code whose new data structures and
language elements print correctly in whatever Common Lisp environment
they're run in.