[racket-dev] repl, void, multiple values.
Hello,
not an important point, just a simple observation that I don't
remember having ever seen raised:
the repl not printing the void object, sometimes creates ambiguities.
Example, given:
(define (ok)
'ok)
(define (not-ok)
(let ((answer 40))
(set! answer (+ answer 2))))
and at the repl:
> (values (ok)
(not-ok))
'ok
> (values (not-ok)
(ok))
'ok
omitting void loses information about which value is which.
====
I made a mistake similar to the not-ok function in real code,
and the ensuing interaction at the repl confused me for a minute or two.
Had I seen
'ok
#<void>
I would have seen immediately my mistake.
Would be sensible to print all the values, even the void value, when
there's more than one value to print?
Cheers
P.