[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: keyword pairs and OPEN
- To: common-lisp at SU-AI
- Subject: Re: keyword pairs and OPEN
- From: Masinter at PARC-MAXC
- Date: Wed, 06 Oct 1982 00:31:00 -0000
- In-reply-to: dlw at SCRC-TENEX's message of Monday, 4 October 1982, 17:08-EDT
Is the :DIRECTION :PROBE a proper function of "OPEN"? It seems semantically
quite different; e.g., :BYTE-SIZE, :CHARACTERS etc seem pretty meaningless.
Tenex/Tops-20 allows for "give me name of new file"; is that generally useful?
Interlisp separates out the "direction" (ACCESS method) from the "recognition mode" in its OPENFILE. (The Interlisp VM is the best description of OPENFILE). Thus,
an alternative to consider would have key words:
:ACCESS - one of :INPUT, :OUTPUT, :APPEND (or ...)
no default
:RECOG - one of :OLD, :NEW, :OLD/NEW (or ...)
default depends on :ACCESS
:TYPE - one of :TEXT or :BINARY or :DEFAULT (or ...)
(default :TEXT)
:BYTE-SIZE (only meaningful and implies :TYPE :BINARY)
I'd then fold in the :IF-EXISTS and :IF-DOES-NOT-EXIST with different
recognition modes.
What most people then want is some notion of a search-path algorithm on
recognition mode :INPUT. This sometimes takes the form of hacking with
the name which is supplied, which perhaps Common Lisp should avoid.