[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
In the description of how to print conses on p. 368 of CLtL, the
algorithm says to "print a space" between successive list elements. Is
this supposed to be taken literally? I have been having some problems
with large data structures printing out on a single line that's too long
for other utilities (like text editors!) to handle. It is very annoying
to have your application write files you can't look at. Turning
*print-pretty* on does give me a file that the editor can read, but some
of the data structures I'm trying to print are so deeply nested that I
would really prefer not to have all that extra whitespace -- *I* can't
read what it's printing.
I know that some people will say it's the editor that's wedged, but I
think that in some cases it would be much more user-friendly to write
out a newline instead of a space when the line length exceeds 80
characters or so. In other cases (like writing to a string output
stream) I probably do not want to get a newline unless I explicitly ask
for one. Maybe the real solution is to add another parameter to write?
Or should this be an attribute of the particular output stream? I don't
have a specific proposal in mind (and I really cringe at the thought of
making CL bigger!), but I thought the problem was worth mentioning....
- print question
- From: email@example.com (Jon L White)