[R6RS] Empty `case' and `cond' expressions?
R. Kent Dybvig
dyb at cs.indiana.edu
Sat Jun 9 10:54:11 EDT 2007
> > I wouldn't mind, but the situation is not entirely analogous,
>
> Could you say why?
If I'm building a cond or case via automatic means, I can get the effect
of no clauses by using '([else (if #f #f)]) as the base case rather than
'(). That is, for example:
(cond [else (if #f #f)])
has the same value and effect as what we're presumably envisioning for
(cond)
There's no similar thing one can do for case-lambda without possibly
ending up with a different exception being raised.
> > so I don't think we need to do so just for the sake of consistency.
>
> By my mind, it's less for consistency, than for simplification purposes.
> (Jonathan Rees alerted me to this, who wasn't even aware of the
> discussion regarding `case-lambda'.)
As I said, I don't mind allowing (cond) and (case e). Not allowing them
has always seemed an unnecessary restriction to me, but then so has not
allowing (begin) as an expression
Kent
More information about the R6RS
mailing list