[r6rs-discuss] "Unspecified"

From: Carl Eastlund <cce>
Date: Fri Sep 22 12:29:38 2006

On 9/22/06, Per Bothner <per_at_bothner.com> wrote:
> Kawa has the literal #!void, and it is equivalent to (values) - i.e.
> zero values.
>
> There is actually one good reason to specify the semantics of
> "unspecified", and that is to suppress printing:
>
> #|kawa:1|# #!void
> #|kawa:2|# (define x 10)
> #|kawa:3|# x
> 10
> #|kawa:4|# (if #f 3)
> #|kawa:5|#
>
> It is a niceity for a REPL to not print anything when the "value
> to be printed" is #!void.

That's an even more direct argument for making set! and friends return
no values to their enclosing continuation (as argued in another part
of this thread). A REPL that prints each value on a separate line
would then print nothing for 0 returned values. (And if a REPL
already does that, you don't want "I returned <unspecified>" to look
the same as "I returned 0 values".)

-- 
Carl Eastlund
Received on Fri Sep 22 2006 - 12:29:29 UTC

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