[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
OPEN for :OUTPUT with version :NEWEST
- To: DLW @ SCRC-TENEX
- Subject: OPEN for :OUTPUT with version :NEWEST
- From: Kent M. Pitman <KMP @ MIT-MC>
- Date: Wed, 22 Jun 1983 07:54:00 -0000
- Cc: common-lisp @ SU-AI
- In-reply-to: Msg of 21 Jun 1983 17:29-EDT from Daniel L. Weinreb <DLW at SCRC-TENEX>
Date: Tuesday, 21 June 1983, 17:29-EDT
From: Daniel L. Weinreb <DLW at SCRC-TENEX>
The following should be made clear by explicit mention somewhere in
Question: If you call OPEN, and the direction is :OUTPUT or :IO, and the
version of the file is :NEWEST, what version number is used?
Answer: If the :IF-EXISTS is :NEW-VERSION or unsupplied, then :NEWEST
in the pathname means "a version number one higher than the highest
version extant." In all other cases :NEWEST in the pathname means "the
highest extant version."
So if versions 1, 2, and 3 of a file exist, and you open the :NEWEST
version for :OUTPUT, then you get version 4 if the :IF-EXISTS is
:NEW-VERSION or unsupplied, but you get version 3 if the :IF-EXISTS is
anything else (e.g. :SUPERSEDE, :APPEND, :OVERWRITE, :RENAME, et al).
Perhaps I'm confused, but isn't it the job of the operating system to decide
what the actual filename is? Must the language spec specify "one higher" or
should it just say "newer" or "higher". It seems to me like this wouldn't
mean any hardship for the users of CL and might make it easier for
implementors of some CL systems depending on how the operating system they
had treated version numbers (eg, some operating system might not assign a
version until the CLOSE happened).
My worry here is that we be careful about not defining detail where it's
not necessary. I'm not arguing that my position as presented here is right;
just requesting commentary/clarification of your intent.