[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Scheme-reports] Return value for unmatched cond-expand



Draft 8 does not say whether the return value for an unmatched cond-expand
is unspecified.

For example, in Chibi,

    (cond-expand)

evaluates to #t.

Meanwhile, the example cond-expand macro on page 72 explicitly tests for no
matches:

    ((cond-expand)
     (syntax-error "Unfulfilled cond-expand"))

This could be important for portability:  

Some implementations could conceivably not match on any clauses on code
without an else-clause.  I'm just saying that it *could* have adverse
effects, but being explicit about it in the text could fix that.

Should you agree, then perhaps a good place for such a note could be in the
following passage on page 15:

    "[...] Otherwise, the cond-expand has no effect. Unlike cond,
    cond-expand does not depend on the value of any variables."

-- 
Christian Stigen Larsen

_______________________________________________
Scheme-reports mailing list
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports