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

can (values) be the (an) unspecified value?



   Date: Thu, 3 Feb 1994 15:28:45 -0500
   From: "R. Kent Dybvig" <dyb@cs.indiana.edu>

   Some R4RS procedures and syntactic forms return an unspecified value,
   e.g., set-car!, write, and set!.  Will it be/should it be acceptable
   for an implementation to return zero values instead of "an" unspecified
   value?  This would make some (strange) conforming R4RS/IEEE programs
   nonconforming R5RS programs, e.g.:

      (let ((y 1)) (let ((x (set! y 2))) y))

   I would prefer that, in spite of this possible inconvenience, we allow
   implementations to return zero (or in fact any number of) values when
   the current report says an unspecified value is returned.  In other
   words, I'd like for R5RS to use the phrase "returns unspecified values"
   or simply "returns unspecified" (with a note up front saying that
   unspecified means zero or more unspecified values) in place of "returns
   an unspecified value" whereever it appears.

   Kent

Does this mean that the implicit continuations in a begin accept 0 or
1 return values, or that you must write silly things like the
following?

(begin
  (call-with-values
    (lambda () (set! x 3))
    (lambda () 3))
  ...)