[r6rs-discuss] "Unspecified" (naming)

Aubrey Jaffer agj at alum.mit.edu
Fri Sep 22 12:02:42 EDT 2006


 | Date: Fri, 22 Sep 2006 10:29:31 -0400 (EDT)
 | From: AndrevanTonder <andre at het.brown.edu>
 | 
 | Actually, I agree with another poster that it would be nice if
 | these expressions returned zero values instead of the current 1.
 | In that case, maybe a "void" "type" would not be so far-fetched for
 | such expressions (ignoring for the moment that the language is
 | untyped).
 | 
 | The reason I would like it if these expressions returned zero
 | values is the following: I sometimes get hard-to-debug errors due
 | to inconsistent data values containing #<unspecified>, due to
 | obscure errors in logic, misplaced parentheses, etc.  I can imagine
 | that newcomers would run into this kind of error quite a bit more
 | often.
 | 
 | The problem with these errors is that they often occur long after
 | the call that inserted the #<unspecified> value in the data
 | structure.  If these expressions returned no value, the error would
 | occur immediately, as it really should, and one would not be able
 | to build such inconsistent data values in the first place.

That is a good idea.  This was not possible in R5RS because of

  "Except for continuations created by the `call-with-values'
  procedure, all continuations take exactly one value."

But R6RS 4.5 says:

  "The continuations discarding these values accept any number of
  values."

The language "value returned is unspecified" would be changed to
"returns no values"; there would be no object to name.



More information about the r6rs-discuss mailing list