[plt-scheme] Question result is not true or false: (void)

From: Prabhakar Ragde (plragde at uwaterloo.ca)
Date: Tue Jan 5 08:47:48 EST 2010

Geoff Knauth wrote:

> If I may jump in with *why* starting with I/O is such a mistake, it's
> because it's hard to write test cases involving I/O, unless a
> person's experience of test cases involves the diffs people see in
> "make test" sometimes found in Makefiles.

The awkwardness of having to use diff on the command line can be 
alleviated by providing primitives to redirect I/O (something like 
`with-output-to-string'). What cannot be smoothed away is the 
awkwardness caused by inherent state -- the state of the input and 
output streams. Code involving mutation is harder to test. --PR

Posted on the users mailing list.