Next: , Previous: , Up: srfi general-cond   [Index]


2.26.3 Rationale

The present set of cond clauses is based on simple boolean testing. It is prohibitively inexpressive in that the condition part of a cond clause that uses => may pass only a single value to the receiver, and it enforces a semantics whereby #f implies failure of the condition.

Programmers frequently use different tokens to imply failure, such as in R5RS’s I/O readers which return a distinguished “EOF object” to denote failure, and a successful condition may produce more than one useful value. This simple extension allows any meaning of “failure” to be assigned on a per–clause basis, and it also allows the condition to return multiple values to be passed to the receiver.