From ... Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!skynet.be!skynet.be!ossa.telenet-ops.be!nmaster.kpnqwest.net!nreader3.kpnqwest.net.POSTED!not-for-mail Newsgroups: comp.lang.lisp Subject: Re: CLOSE and OUTPUT-STREAM-P References: <3226652067142909@naggum.net> <3226677650284867@naggum.net> <4n0wn17w1.fsf@beta.franz.com> Mail-Copies-To: never From: Erik Naggum Message-ID: <3226687795601675@naggum.net> Organization: Naggum Software, Oslo, Norway Lines: 37 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 01 Apr 2002 22:09:40 GMT X-Complaints-To: newsmaster@KPNQwest.no X-Trace: nreader3.kpnqwest.net 1017698980 193.71.199.50 (Tue, 02 Apr 2002 00:09:40 MET DST) NNTP-Posting-Date: Tue, 02 Apr 2002 00:09:40 MET DST Xref: archiver1.google.com comp.lang.lisp:30748 * Duane Rettig | But what does it actually mean to "reopen" a stream? To use the information that a stream known about itself to open the same source again in precisely the same way it was first opened. If this were not possible, one would have to associate the stream with some hash table or something else that keeps this information around, but there is no way to make a stream point back to such information, so if you have to do these things, it creates a hairy information maintenance and consistency problem. E.g., a stream, even a closed stream, is a pathname designator. I do not mean to "reuse" the streams object, although it would be very convenient if open could take an open stream and return a clone or a closed stream and return a new open stream to the same object insofar as that be possible. | If the file is external and in fact externally changeable, there may be | no way to reestablish a connection that looks the same as the one | previously established. But this may be intentional, like a file-position back to the beginning of the file may cause subsequent read-char calls to return different values than last time because the file has been independently modified. | I am not arguing against saving as much information as possible for the | subsequent reopening of a stream if possible, but I am warning that such | reopening might not be possible. Well, you have no guarantee that you can read the data that was in the file at the time it was opened, either. One needs to be aware of such things when dealing with the hostile external world. I am not arguing for a change to the universe in order to get a desired feature. /// -- In a fight against something, the fight has value, victory has none. In a fight for something, the fight is a loss, victory merely relief.