Subject: Re: (open :direction :probe ...) vs probe-file
From: Erik Naggum <>
Date: 24 Jan 2004 14:44:30 +0000
Newsgroups: comp.lang.lisp
Message-ID: <>

* Peter Seibel
| I admit I hadn't thought of using it to carry around the element-type
| information for later use.

  Not only that, it is useful to remember the external-format argument
  to be used to open a particular file.  The pathname is unable to carry
  all this information around.

| I never realized that passing a stream as a pathname designator to
| OPEN *should* convey anything more than the name of the file that the
| stream was associated with. I just reread the OPEN dictionary entry
| and didn't see anything to suggest that; did I miss it or is it
| somewhere else in the spec?

  No, it just falls in the category of my reasonable expectations, which
  may or may not be codified or shared by others.  Now I realize that I
  had written my own open that effectively did

  (open <stream> ... :element-type (stream-element-type <stream>)
                     :external-format (stream-external-format <stream>))

  in addition to figuring out the direction of the stream if :direction
  was not explicitly specified.

Erik Naggum | Oslo, Norway

Act from reason, and failure makes you rethink and study harder.
Act from faith, and failure makes you blame someone and push harder.