[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Carl Hoffman <CWH%SCRC-TENEX@MIT-MC.ARPA>, "Bernard S. Greenberg" <BSG%SCRC-TENEX@MIT-MC.ARPA>, Skef Wholey <Wholey@CMU-CS-C.ARPA>, "Scott E. Fahlman" <Fahlman@CMU-CS-C.ARPA>
- Subject: :IF-EXISTS :SUPERSEDE
- From: "David A. Moon" <Moon%SCRC-TENEX@MIT-MC.ARPA>
- Date: Mon, 5 Dec 83 23:12 EST
- Cc: Common-Lisp@SU-AI.ARPA, Bug-Lispm%SCRC-TENEX@MIT-MC.ARPA, ROM%SCRC-TENEX@MIT-MC.ARPA, file-protocol%SCRC-TENEX@MIT-MC.ARPA, jwalker%SCRC-TENEX@MIT-MC.ARPA
- In-reply-to: The message of 4 Dec 83 16:57-EST from Carl Hoffman <CWH at SCRC-TENEX>, The message of 5 Dec 83 11:25-EST from Bernard S. Greenberg <BSG at SCRC-TENEX>, The message of 5 Dec 83 11:25-EST from Bernard S. Greenberg <BSG at SCRC-TENEX>, The message of 5 Dec 83 12:20-EST from Skef Wholey <Wholey at CMU-CS-C>, The message of 5 Dec 83 12:20-EST from Skef Wholey <Wholey at CMU-CS-C>, The message of 5 Dec 83 12:26-EST from Scott E. Fahlman <Fahlman at CMU-CS-C>, The message of 5 Dec 83 12:26-EST from Scott E. Fahlman <Fahlman at CMU-CS-C>, The message of 5 Dec 83 14:32-EST from Carl Hoffman <CWH at SCRC-TENEX>
Date: Monday, 5 December 1983, 11:25-EST
From: Bernard S. Greenberg <BSG at SCRC-TENEX>
Subject: :IF-EXISTS :SUPERSEDE vs. :NEWEST
We are having a little dispute here about the intended semantics of
:IF-EXISTS :SUPERSEDE on output, when the file version of the pathname
to be opened is :NEWEST. The manual is not specific on what this means.
It (Excelsior edition) says "This differs from :NEW-VERSION in that
:SUPERSEDE creates a new file with the same name as the old one". That
seems quite specific to me. If you write a.b.newest in :IF-EXISTS
:SUPERSEDE mode, you create a new file with the same version number as
the newest existing version of a.b, replacing (superseding) that
It might be valuable for the manual to contain a note such as "if the
version component of the pathname is :NEWEST, then one of two rules
for developing a specific version number is used. If the value of
:DIRECTION is :OUTPUT or :IO and the value of :IF-EXISTS is :NEW-VERSION,
then a version number one higher than the highest existing version is
used. In all other cases, the highest existing version is used."
Imagine a program that took user input for a file name, and wrote
out to that file. (Can't argue with that, right?). Suppose further
that this program did not like the CL default of :error, and wanted
you to be able to write out to a.b.3 if that's what you said.
So it might open its file with :IF-EXISTS :SUPERSEDE. Well, suppose
you said a.b.newest to it? You CERTAINLY don't want it looking up
what the latest version is and superseding it! You want it to create
a new version.
This is a good point; a program with such a user interface needs to check
pathname-version of its pathname to decide what :IF-EXISTS option to use,
since we failed to provide one that implements that behavior.
Given the primitives available to the file server in versionated
operating systems, it is impossible to implement this as proposed
without a window between determining the version number and opening
it for superseding.
This argument is false. The Tops-20/Tenex Chaosnet file server has
no problem doing this without windows. During the time between opening
and closing, the old file is in an "open for reading" state that
prevents anyone else from superseding it or renaming it. Presumably other
versionated operating systems may have comparable primitives.
It seems to me that what we must do is quite clear and there are no
choices to be made.