[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

OPEN-KEYWORDS



Issue:		OPEN-KEYWORDS
References:	Pages 420-422
Category:	CHANGE
Edit history:	Revision 1 by Skona Brittain 07/17/87

Problem Description:

  The :if-exists and :if-does-not-exist arguments interact, but keyword
  arguments should generally be orthogonal.

Proposal (OPEN-KEYWORDS:ORTHOGONAL):

  Delete the following phrases from the first 2 paragraphs on page 422:
  ", or if the :if-exists argument is :overwrite or :append" and
  ", and the if-exists argument is anything but :overwrite or :append"

Test Case:

  The following piece of code causes an error to be signaled:
  (open "test" :direction :output :if-exists :overwrite)
  if a file named "test" -doesn't- already exist.
  With the change in this proposal, it wouldn't be an error.

Rationale:

  As is clear from the test case example, a user might want to specify
  that a certain action get taken in the case that a file already
  exists, without affecting what happens in the case that it doesn't
  exist.  There is no good reason for the two cases to affect each
  other.

Current Practice:



Adoption Cost:

  Slight.

Benefits:

  More sensible, easier to understand, more efficient to use and to
  implement.

Conversion Cost:

  Slight, automatable.

Esthetics:

  Keyword arguments are supposed to be orthogonal, thus this deviation
  is unaesthetic.  It being so contrary to intuition makes it particularly
  difficult for new LISP users to grasp.

Discussion: