#

## Issue EXTRA-RETURN-VALUES Writeup

    Version 6 (not shown here) is what passed.
    It was modified by amendment to strike everything in the
    proposal section except for the first paragraph.
    v6 is the one that passed.
     -kmp (Aug 89)

    -----
    Issue:        EXTRA-RETURN-VALUES
    References:   Chapter 1, Section 1.5, Working draft of standard
    Category:     Clarification
    Edit history: 8-JAN-89, Version 1 by Masinter
    	      3-FEB-89, Version 2 by Chapman
    	      10-MAR-89, Version 3 by Chapman
                  30-MAY-89, Version 4 by Pierson
                  20-JUN-89, Version 5 by Chapman

    Problem: Is it OK to return extra values from Common Lisp functions?

    Proposal: EXTRA-RETURN-VALUES:NO

    A function that is specified by the standard must return EXACTLY the number
    of return values specified by the standard.

    The following functions are explicited permitted to have additional
    return values:

      gethash
      remhash
      get-macro-character
      get-dispatch-macro-character
      read
      read-preserving-whitespace
      read-delimited-list
      read-line
      read-char
      unread-char
      peek-char
      listen
      read-char-no-hang
      read-from-string
      parse-integer
      read-byte
      write-to-string
      prin1-to-string
      princ-to-string
      write-string
      format
      y-or-n-p
      yes-or-no-p
      open
      rename-file
      probe-file
      directory
      trace
      untrace
      apropos-list
      describe

    Rationale:

    The reason is that additional arguments are visible to otherwise
    portable programs. For instance, (multiple-value-call #'cons (floor x
    y)) looks portable, but it will try to pass the wrong number of
    arguments to CONS if FLOOR returns an extra value.

    The order of the above list is by page number in CLtL.

    Current Practice:

    At least one implementation returns extra values for certain functions
    not currently specified to return those values.

    Adoption Cost:

    Implementations and their associated documentation that now contain
    functions that return extra values will have to change.

    Benefits:

    Programs will potentially become more portable.

    Conversion Cost:

    See Adoption Cost.

    Aesthetics:

    None.

    Discussion:
    Pierson created the original list, Moon revised the list.

    Moon says:
    "The ones that I care the most about are gethash and read-line."

Copyright 1996-2001, Xanalys Inc. All rights reserved.