[r6rs-discuss] "Unspecified" (naming)

From: Aubrey Jaffer <agj>
Date: Fri Sep 22 12:03:02 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.
Received on Fri Sep 22 2006 - 12:02:42 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:01 UTC