Subject: Re: STRING=
From: (Rob Warnock)
Date: Sun, 15 Jun 2003 05:54:40 -0500
Newsgroups: comp.lang.lisp
Message-ID: <>
Kent M Pitman  <> wrote:
| And Designators

This brings up something that I've always wondered about. says:

	For example, ``nil'' and ``the value of *standard-output*''
	are operationally indistinguishable as stream designators.

And indeed, the Glossary entry says:

	stream designator n. a designator for a stream; that is, an
	object that denotes a stream and that is one of: t (denoting
	the value of *terminal-io*), nil (denoting the value of
	*standard-input* for input stream designators or denoting
	the value of *standard-output* for output stream designators),
	or a stream (denoting itself). 

So why does FORMAT -- apparently uniquely among output functions --
interpret NIL and T as destinations differently than the normal convention
for stream designators? Mere convenience? (...and historical compatibility
too, I'm guessing.)

I'm not really complaining, just asking. Certainly this:

	(format nil "blah, blah ~S ~S~%" foo bar)

is more convenient than this:

	(with-output-to-string (s)
	  (format s "blah, blah ~S ~S~%" foo bar))

But was that the only reason, convenience?


Rob Warnock, PP-ASEL-IA		<>
627 26th Avenue			<URL:>
San Mateo, CA 94403		(650)572-2607