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

OPEN-KEYWORDS



Is this the one that's listed in the status report as:

    * OPEN-KEYWORDS-EXISTS (Version 1, 17-Jul-87)
      No discussion.
    ???? Ready for release ?

The date matches, although the issue name is different.

The category should clarify that it's an incompatible change.  Other
than that, this looks ready for release.  If it was a compatible change
I would favor it, but since it's incompatible I'd have to think for a
while before I have any opinion.

    Date: Fri, 24 Jul 87 13:25 EDT
    From: Kent M Pitman <KMP@STONY-BROOK.SCRC.Symbolics.COM>

    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.

I expect we can find plenty of other places in Common Lisp where keyword
arguments are not truly orthogonal, so that's a fairly weak argument.

    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: