[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: truth of '()
Morry says, ``use of PAIR?, etc. forces the programmer to specify the types
of values he/she expects the given function to return and consequently
informs the reader of this information''.
This is only true if the function is expected to return several different
kinds of values (otherwise, the test would not be necessary and thus would
not appear). The kinds of tests used now are precisely the same as this.
Every time I say (if (foo) (bar) (baz)), in your system I might just say
(if (false? (foo)) (baz) (bar)). This doesn't tell you any more than the
other. When I use PAIR?, you only know that pairs are one of the
possibilities; you have no notion of the other possibilities. In current
Scheme, when I say (if (foo) ...) you know that #f is one of the
possibilities. This seems symmetric to me. I see no reason to prefer the
type of pairs over the type containing only #f.