[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Issue: STREAM-INFO (Version 4)
- To: vanroggen%bach.decnet@hudson.dec.com
- Subject: Issue: STREAM-INFO (Version 4)
- From: Kent M Pitman <KMP@STONY-BROOK.SCRC.Symbolics.COM>
- Date: Tue, 28 Jun 88 12:38 EDT
- Cc: cl-cleanup@sail.stanford.edu, Dick@WHEATIES.AI.MIT.EDU
- In-reply-to: The message of 28 Jun 88 12:04 EDT from "BACH::VANROGGEN" <vanroggen%bach.decnet@hudson.dec.com>
[Added Dick@WHEATIES.AI.MIT.EDU -- He's not on CL-Cleanup. Please
remember to CC him explicitly. -kmp]
Date: 28 Jun 88 12:04:00 EDT
From: "BACH::VANROGGEN" <vanroggen%bach.decnet@hudson.dec.com>
I dislike the names OUTPUT-WIDTH and OUTPUT-POSITION for several reasons:
(1) It's ambiguous--the "position" could be for the whole stream output
so far instead of just the current line.
(2) VAX LISP already has exactly the functionality of OUTPUT-POSITION but
with the name LINE-POSITION.
LINE-POSITION is ok by me.
VAX LISP also has a function called RIGHT-MARGIN, which might be the same
as OUTPUT-WIDTH, but I'm not sure.
I tried not to call it anything with the word "right" in it for the sake of
anyone who might get ambitious and want to do a Hebrew implementation that
went right to left. The text descriptions probably mention left/right all
over the place, but I felt that was less critical and easier to work around
than having the language primitives themselves be biased.
LINE-WIDTH would be consistent and ok with me, though.
Is the intent of OUTPUT-WIDTH to provide an indication to the pretty
printer of how far it knows it can print towards the side? Is it meant
to be an absolute limit, in that printing beyond that point is undefined?
The point beyond which things get ugly or wrap or truncated or whatever.
Undefined, I guess.
What should the OUTPUT-WIDTH of string streams be?
Someone proposed NIL, which seemed right to me.
In VAX LISP, the RIGHT-MARGIN of string streams is 80, but we allow
users to override how far the printer goes before inserting newlines.
It's so easy to do (OR (OUTPUT-WIDTH ...) 80) that I think it's a bad idea
to return a number if you don't mean it. If you do, it's hard to tell the
difference between an intentional and an accidental number. In the worst case,
there should be a DEFAULT argument, which defaults but can be overridden.
I doubt we'd all be able to agree on a number to which it should default,
though, so its value probably couldn't be relied upon portably.
A lesser name complaint is OUTPUT-SPACE might be better named WRITE-SPACE
to match the other WRITE-xxx functions.
---Walter
------
WRITE-SPACE sounds ok to me.